microsoft / microsoft/fluentui
[Bug]: Commandbar calculates an error after modifying the global text spacing
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 20.3k
- Forks
- 2.9k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 46
Description
Library
Reac / v8 (@fluentui/react)
System Info
System:
OS: Windows 10 10.0.22621
CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11500 @ 2.70GHz
Memory: 3.22 GB / 15.73 GB
Browsers:
Edge: Spartan (44.22621.2134.0), Chromium (116.0.1938.62)
Internet Explorer: 11.0.22621.1
Are you reporting Accessibility issue?
None
Reproduction
https://github.com/microsoft/fluentui/assets/41287016/223d2016-1edd-43df-98db-5c1df1bdd7b8
Bug Description
Actual Behavior
After the word spacing is changed, the Commandbar is not calculated according to the changed width, resulting in an abnormal display. This can cause dyslexia for people with poor eyesight.
Expected Behavior
After changing the text spacing, Commandbar calculates the correct width, which can be recalculated based on the modified width after the calculation update is triggered
Here are the modified font styles:
*{line-height:1.5 !important;letter-spacing:0.12em !important;word-spacing:0.16em !important;}p{margin-bottom:2em !important;}
The following is the reproduced page address:
https://developer.microsoft.com/en-us/fluentui#/controls/web/commandbar
The following is a reproduced video:
https://github.com/microsoft/fluentui/assets/41287016/223d2016-1edd-43df-98db-5c1df1bdd7b8
Logs
No response
Requested priority
High
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- The provided reproduction is a minimal reproducible example of the bug.
### Tasks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the linked Fluent UI Commandbar reproduction and apply the reported line-, letter-, and word-spacing styles to confirm the incorrect width calculation. Trace the Commandbar entry point that measures or recalculates its width; done means the layout updates to the correct width after text spacing changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100