Skip to content

feat(datetime-button): add dynamic type support - #27848

Merged
brandyscarney merged 12 commits into
FW-4146from
FW-4426
Jul 26, 2023
Merged

feat(datetime-button): add dynamic type support #27848
brandyscarney merged 12 commits into
FW-4146from
FW-4426

Conversation

@brandyscarney

Copy link
Copy Markdown
Member

Issue number: N/A


What is the current behavior?

The datetime button does not support dynamic type.

What is the new behavior?

Adds support for dynamic type by converting font-size to use rem units and adding an ellipsis to text when the size is too large.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dynamic type can be enabled with the following CSS:

html {
  --ion-dynamic-type: var(--ion-default-dynamic-font);
}

@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions github-actions Bot added the package: core @ionic/core package label Jul 24, 2023
@brandyscarney
brandyscarney marked this pull request as ready for review July 24, 2023 22:01
Comment thread core/src/components/datetime-button/test/a11y/datetime-button.e2e.ts Outdated

@liamdebeasi liamdebeasi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

Comment thread core/src/components/datetime-button/datetime-button.scss Outdated
Comment thread core/src/components/datetime-button/test/a11y/datetime-button.e2e.ts Outdated

@thetaPC thetaPC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liamdebeasi liamdebeasi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

edit: one comment below, but not really a bug

Comment thread core/src/components/datetime-button/datetime-button.scss Outdated
@brandyscarney
brandyscarney merged commit 92c6b59 into FW-4146 Jul 26, 2023
@brandyscarney
brandyscarney deleted the FW-4426 branch July 26, 2023 20:26
sean-perkins pushed a commit that referenced this pull request Aug 18, 2023
Issue number: N/A

---------

## What is the current behavior?
The datetime button does not support dynamic type.

## What is the new behavior?
Adds support for dynamic type by converting `font-size` to use `rem`
units and adding an ellipsis to text when the size is too large.

## Does this introduce a breaking change?

- [ ] Yes
- [x] No


## Other information

Dynamic type can be enabled with the following CSS:

```css
html {
  --ion-dynamic-type: var(--ion-default-dynamic-font);
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants