-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-structure TabList Animated Indicator code to work better with RTL …
…layouts (#3236) * Fix RTL styling on win32 * Change files * Fix RTL rendering on mac * Fix snapshot tests failing * Re-add root slot to fix indicator positioning * Rewrite animated indicator to work better with RTL This commit simplifies the logic of the animated indicator. Rather than positioning the indicator using a calculated `start` value, we position it using absolute layout values within the tablist. Now, the `useTabAnimation` hook does all the math to figure out the top and left offsets of the indicator, and the styling hook for the animatedIndicator simply uses them to position the `top` and `left` layout props. The container slot of the animated indicator is also removed. * Clean-up: refactoring + adding comments * Fix snapshot tests * Fix tablist test page title again * Fix wrong token setting indicator border radius
- Loading branch information
1 parent
d05effc
commit 942da04
Showing
16 changed files
with
2,173 additions
and
2,090 deletions.
There are no files selected for viewing
This file contains 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
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-native-tablist-b10064ff-2f81-4674-ba5b-11ff56248cc4.json
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Change TabList test page title to be correct", | ||
"packageName": "@fluentui-react-native/tablist", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-native-tester-ffb2f6e8-58d8-43fa-b6b1-9ae2a8e75bee.json
This file contains 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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "Fix RTL styling on win32", | ||
"packageName": "@fluentui-react-native/tester", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
This file contains 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 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 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 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 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 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.