Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date-range-picker Design to use Prev and Next Buttons in History and Logbook on mobiles #23228
Date-range-picker Design to use Prev and Next Buttons in History and Logbook on mobiles #23228
Changes from 4 commits
9d41dbb
c8821cb
4a492e4
2e91057
0236477
3a94afa
3391d93
24cc7c0
a7c3e0c
ec34310
e47381a
de88aa6
1e87d23
143d92b
ee9c0f7
1e2ed13
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel like this should be part of
ha-textarea
. Also usemobile-multiline
as a name otherwise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed a way to display it in one-line, my solution was to add "white-space: nowrap;" for desktops: this ignores the nextline \n in the datestring. Have not found a better way change css for ha-textarea from outside
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use the translation key of another selector, you can reference its value though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or use the already existing start_date and end_date? "Start date - End date" would be more explaining as "Date Time" for the range
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets extract the next and prev functions from
hui-energy-period-selector
and make them helper functions we can use here too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new functions can deal with any-ranges and also shorter than one day. If selected a week the range is 7 days: so Week is not needed. Extra logic is only needed for month, as the timespans can be different. And the month-Logic can also shift between years without problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still they share the same logic right? So we can combine them into 1 function we use in both places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, took now a detailed look at it: you are right: we can combine them. Will upload a draft: hopefully that's the way it should be done ..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you remove
margin-right
, you should also remove these 2