-
Notifications
You must be signed in to change notification settings - Fork 541
Fixing Keyboard accessibility for Query Results grid. #20327
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
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2ae7c36
initi commit
aasimkhan30 c4d8af8
fix stuff
aasimkhan30 b5d7a41
Merge remote-tracking branch 'origin/main' into aasim/fix/keyboardAcc…
2e7f6aa
fixing command bar accessibility
157b8d5
commom utils
8599188
fixing all grid accessibility
5565808
loc
c669abc
fixing width
2f05ea9
Merge remote-tracking branch 'origin/main' into aasim/fix/keyboardAcc…
ffa0da2
fix comments
83a93a1
undoing extra change
884ddc8
Fixed stuff
ca4dd25
Make it consistent
5fbf320
undoing comment
5609336
Adding comments
f0c1baf
fixing shortcuts
a14c9fe
Cleanup
9c8e7ee
fixing logic
a0f275c
fix stuff
33a9412
fix stuff
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,60 @@ | ||
| ## Creating custom React Fluent icons | ||
|
|
||
| 1. Clean up | ||
| Fluent icons are constructed with an array of paths, but without any `fill-rule` or `clip-rule` entries. You can use the free/OSS Inkscape to clean this up easily: | ||
| Fluent icons are constructed with an array of paths, but without any `fill-rule` or `clip-rule` entries. You can use the free/OSS Inkscape to clean this up easily: | ||
|
|
||
| 1. Open your SVG | ||
| * File → Open… and load your SVG. | ||
| * Make sure your shape with fill-rule="evenodd" is visible. | ||
| 1. Open your SVG | ||
|
|
||
| 2. Select the path(s) | ||
| * Use the Select tool (S) and click the object. | ||
| * If it’s a compound path, you may need Object → Ungroup first. | ||
| - File → Open… and load your SVG. | ||
| - Make sure your shape with fill-rule="evenodd" is visible. | ||
|
|
||
| 3. Convert the shape into geometry that respects the evenodd fill | ||
| * With the path selected, go to: | ||
| * Path → Break Apart (Shift+Ctrl+K) | ||
| * This splits the path into its component sub-paths. | ||
| * Inkscape interprets the evenodd rule at this step: “holes” become independent paths. | ||
| 2. Select the path(s) | ||
|
|
||
| 4. Subtract the holes (if present) | ||
| * Select the main outer shape, then the hole shapes. | ||
| * Use Path → Difference (Ctrl+-) to cut the holes out. | ||
| * Repeat until all inner holes are cut away. | ||
| * Now you have pure geometry with no reliance on fill-rule. | ||
| - Use the Select tool (S) and click the object. | ||
| - If it’s a compound path, you may need Object → Ungroup first. | ||
|
|
||
| 3. Convert the shape into geometry that respects the evenodd fill | ||
|
|
||
| - With the path selected, go to: | ||
| - Path → Break Apart (Shift+Ctrl+K) | ||
| - This splits the path into its component sub-paths. | ||
| - Inkscape interprets the evenodd rule at this step: “holes” become independent paths. | ||
|
|
||
| 4. Subtract the holes (if present) | ||
| - Select the main outer shape, then the hole shapes. | ||
| - Use Path → Difference (Ctrl+-) to cut the holes out. | ||
| - Repeat until all inner holes are cut away. | ||
| - Now you have pure geometry with no reliance on fill-rule. | ||
|
|
||
| 2. Use this script to scale all the paths to your target size: | ||
|
|
||
| `npm install svgpath` | ||
| `npm install svgpath` | ||
|
|
||
| ```js | ||
| // scaleSvg.js | ||
| ```js | ||
| // scaleSvg.js | ||
|
|
||
| import svgpath from 'svgpath'; | ||
| import svgpath from "svgpath"; | ||
|
|
||
| const fabricPath = "M 42.400391..."; // replace with your path | ||
| const fabricPath = "M 42.400391..."; // replace with your path | ||
|
|
||
| const currentViewboxSize = 40; // replace with the viewbox from your existing SVG | ||
| const targetSize = 20; // replace with your target viewbox size | ||
| const currentViewboxSize = 40; // replace with the viewbox from your existing SVG | ||
| const targetSize = 20; // replace with your target viewbox size | ||
|
|
||
| const scale = targetSize / currentViewboxSize; | ||
| const scale = targetSize / currentViewboxSize; | ||
|
|
||
| const scaled = svgpath(fabricPath) | ||
| .scale(scale) | ||
| .toString(); | ||
| const scaled = svgpath(fabricPath).scale(scale).toString(); | ||
|
|
||
| console.log(scaled); | ||
| ``` | ||
| console.log(scaled); | ||
| ``` | ||
|
|
||
| `node scaleSvg.js` | ||
| `node scaleSvg.js` | ||
|
|
||
| 3. Create the React icon: | ||
|
|
||
| ```ts | ||
| // in this example, the target size is 20. | ||
| ```ts | ||
| // in this example, the target size is 20. | ||
|
|
||
| import { createFluentIcon } from "@fluentui/react-icons"; | ||
| const iconPath = "M19.2729..."; // paths scaled to target size 20, from previous step | ||
| export const CustomIcon20 = createFluentIcon("CustomIcon20", "20", [iconPath]); | ||
| ``` | ||
| import { createFluentIcon } from "@fluentui/react-icons"; | ||
| const iconPath = "M19.2729..."; // paths scaled to target size 20, from previous step | ||
| export const CustomIcon20 = createFluentIcon("CustomIcon20", "20", [iconPath]); | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.