-
Notifications
You must be signed in to change notification settings - Fork 77
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
fix(slider): numbers remain on one line for locales with space group separators #7472
Conversation
// change whitespace group characters that don't render correctly | ||
this._group = this._actualGroup.trim().length === 0 ? " " : this._actualGroup; | ||
// change whitespace group characters that don't render correctly to a unicode no-break space | ||
this._group = this._actualGroup.trim().length === 0 || this._actualGroup == "\u0020" ? "\u00A0" : this._actualGroup; |
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.
It might be prettier to use html entities here instead of unicode. What do you think?
this._actualGroup === " " ? " " : this._actualGroup;
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.
Yeah I agree that's nicer for the nbsp, but I like being very explicit about what is in " "
, since there are a ton of white space characters that could have been copy/pasted in there. And then I didn't want to mix and match unicode and HTML entities. But I don't feel strongly about it if you'd like me to switch. Also story incoming
…p-non-breaking * origin/main: chore(accordion-item): add more info about accordion item sync (#7473)
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.
✨ Beautiful ✨ 👍
🤖 I have created a release *beep* *boop* --- <details><summary>@esri/calcite-components: 1.5.1</summary> ## [1.5.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-08-08) ### Bug Fixes * **accordion:** Restore accordion-items working with accordion across shadow DOM ([#7466](#7466)) ([bedb5db](bedb5db)) * **action-bar, action-pad:** Add native tooltip to expand action ([#7452](#7452)) ([9673ef7](9673ef7)) * Fix SSR build error caused by browser-sniffing util ([#7461](#7461)) ([e5381fa](e5381fa)) * **flow-item:** Use a native tooltip for the back button ([#7442](#7442)) ([f38167b](f38167b)) * **input:** Fix clearable from throwing an error when value is undefined ([#7476](#7476)) ([633c2cd](633c2cd)) * **list:** Add missing drag handle locale strings ([#7462](#7462)) ([2b5463e](2b5463e)) * **panel:** Add native tooltip to close button. ([#7434](#7434)) ([70b45cf](70b45cf)) * **panel:** Allow panel content to take full height. ([#7454](#7454)) ([b6bf54f](b6bf54f)) * **panel:** Correct header and action-bar z-indexing display issues ([#7440](#7440)) ([db7eac7](db7eac7)) * **slider:** Numbers remain on one line for locales with space group separators ([#7472](#7472)) ([2747b22](2747b22)) </details> <details><summary>@esri/calcite-components-react: 1.5.1</summary> ## [1.5.1](https://github.com/Esri/calcite-design-system/compare/@esri/[email protected]...@esri/[email protected]) (2023-08-08) ### Miscellaneous Chores * **@esri/calcite-components-react:** Synchronize undefined versions ### Dependencies * The following workspace dependencies were updated * dependencies * @esri/calcite-components bumped from ^1.5.1-next.4 to ^1.5.1 </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Related Issue: #7151
Summary
Numbers with a space group separator are breaking onto multiple lines. This replaces the space with a non-breaking space (nbsp) HTML entity.
ref: https://en.wikipedia.org/wiki/Non-breaking_space