-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
feat(datetime): add header text to multiple selection; improve header consistency between modes #25817
Conversation
font-size: 14px; | ||
} | ||
|
||
:host .datetime-header .datetime-title { | ||
color: var(--title-color); | ||
} | ||
|
||
font-size: 14px; | ||
:host .datetime-header .datetime-selected-date { | ||
@include margin(10px, null, null, null); | ||
} |
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.
This styling was fairly arbitrary on my part, since we don't have anything existing to go on as far as native comparisons go. I just re-used the same font size and picked a margin that looked good with the existing design.
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.
Since this feature changes the behavior of single selection datetime, should we also have similar checks as the multiple tests, to verify that text is rendering correctly (outside of screenshot tests)?
I would say the screenshot tests cover that, since the header text can only show the one selected date -- unlike when |
Co-authored-by: Sean Perkins <sean@ionic.io>
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.
Great work on this! I'm good with or without the rename of the prop.
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.
Is integrating datetime-button
with these changes part of this work, or would you recommend we do separate design work for that?
I figure updating |
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.
Great job! The property name is a bit wordy, but I also can't think of a shorter name that is still descriptive.
Pull request checklist
Please check if your PR fulfills the following requirements:
ionic-docs
repo, in a separate PR. See the contributing guide for details.npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
multiple="true"
and the header is enabled (e.g. whenshowDefaultTitle="true"
), the part of the datetime's header that shows what date you have selected (hereafter referred to as just "the header") is not rendered.ios
mode at all, whethermultiple
is enabled or not.Issue URL: resolves #25668
md
modeios
modeWhat is the new behavior?
multiple="true"
. If 0 or more than 1 dates are selected, the header shows the number, rather than the exact selected dates. (The behavior when exactly 1 date is selected is unchanged.)titleSelectedDatesFormatter
which can be used to customize the display of the header for localization purposes.ios
mode. The text is identical between the two modes in all cases.md
modeios
modeDoes this introduce a breaking change?
Other information