Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Group common declarations of mx_AppsDrawer--2apps and mx_AppsDrawer--3apps #11108

Closed
wants to merge 2 commits into from
Closed

Conversation

luixxiul
Copy link
Contributor

@luixxiul luixxiul commented Jun 17, 2023

For element-hq/element-web#25268

This PR intends to group common declarations of mx_AppsDrawer--2apps and mx_AppsDrawer--3apps to improve maintainability.

Those class names were originally added by 7be5ff0 for a PR #5266 which initially implemented a pinned widget, and there does not seem to be a specific reason why "nth-child(3)" was applied for each class name. It also seems there was not a reason why '33%' was picked instead of 100%/3 to count 1%.

0

type: task

Signed-off-by: Suguru Hirahara [email protected]

Checklist

  • Tests written for new code (and old code if feasible)
  • Linter and other CI checks pass
  • Sign-off given on the changes (see CONTRIBUTING.md)

This change is marked as an internal change (Task), so will not be included in the changelog.

…3apps

Those class names were originally added by 7be5ff0 for a PR which initially implemented a pinned widget, and there does not seem to be a specific reason why "nth-child(3)" was applied for each class name.
@github-actions github-actions bot added Z-Community-PR Issue is solved by a community member's PR T-Task Refactoring, enabling or disabling functionality, other engineering tasks labels Jun 17, 2023
@luixxiul luixxiul marked this pull request as ready for review June 17, 2023 05:50
@luixxiul luixxiul requested a review from a team as a code owner June 17, 2023 05:50
Copy link
Contributor

@germain-gg germain-gg left a comment

Choose a reason for hiding this comment

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

I don't understand the need to use 2apps and 3apps at all?

mx_AppsDrawer is a flex container, so why not give mx_AppTiles elements flex: 1; so they take one fraction of the available space?
Setting the width seems extraenous in this scenario? And I definitely do not see a use for the --2apps and --3apps modifiers. An app wide search did not yield any result either

@luixxiul
Copy link
Contributor Author

@gsouquet please ask @t3chguy as he's the one who implemented it with 7be5ff0. I'm not the one who adds it newly

@luixxiul luixxiul closed this Jun 19, 2023
@luixxiul luixxiul deleted the AppsDrawer branch June 19, 2023 09:21
@germain-gg
Copy link
Contributor

I understand you're not the one who implemented it originally. However you're updating this behaviour and I'm giving you a review based on the diff I have in front of me.

If we're going to change the layout code, might as well leverage the flex property. This seems like a fair ask in this context.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants