Skip to content
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

ShimmeredDetailsList: modify some math logic #5824

Merged
merged 2 commits into from Aug 9, 2018

Conversation

Vitalius1
Copy link
Contributor

@Vitalius1 Vitalius1 commented Aug 6, 2018

Pull request checklist

  • Addresses an existing issue: Fixes a misaligned ShimmeredDetailsList
  • Include a change request file using $ npm run change

Description of changes

ShimmeredDetailsList was not taking into consideration the isPadded property of the column so had to adjust some widths of shimmer elements plus took advantage to replace a hard coded multiplier with a constant ratio.

This is how it looks misaligned:
screen shot 2018-08-06 at 12 27 11 pm

This is how it looks after the fix:
screen shot 2018-08-06 at 3 46 24 pm

Microsoft Reviewers: Open in CodeFlow

width:
cellStyleProps.cellRightPadding +
(column.calculatedWidth! - column.calculatedWidth! * SHIMMER_LINE_VS_CELL_WIDTH_RATIO) +
(column.isPadded ? cellStyleProps.cellExtraRightPadding : 0),
Copy link
Member

Choose a reason for hiding this comment

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

hmmm. i see the word "right". Is this RTL friendly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dzearing I tested it with the link provided by VSTS: Deploy Demo and indeed it works as intended in RTL. Plus to that the value calculated in here is applied to the width of a container and should not affect RTL layout.

@dzearing dzearing merged commit 9b74e78 into microsoft:master Aug 9, 2018
@Vitalius1 Vitalius1 deleted the v-vibr/ShimmeredDetailsListFix branch November 7, 2018 21:03
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants