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

Normalize class names of AppTile and create _AppTile.pcss #11003

Closed
wants to merge 17 commits into from
Closed

Normalize class names of AppTile and create _AppTile.pcss #11003

wants to merge 17 commits into from

Conversation

luixxiul
Copy link
Contributor

@luixxiul luixxiul commented May 27, 2023

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.

- Add mx_AppTile by default
- Cancel values inherited from mx_AppTile for now
mx_AppTile--mini is a variant of mx_AppTile
mx_AppTile--fullWidth is a variant of mx_AppTile
Those values are not required
mx_AppTileMenuBar* is defined by mx_AppTile
Add mx_AppTile--large if this.props.miniMode is not true

This enables to remove declarations not universally shared by AppTile variants from "mx_AppTile", in order to remove declarations which are used to just unset inherited values

- Apply border and background-color to "mx_AppTile--large" and "mx_AppTile--fullWidth" only, to remove unset from "mx_AppTile--mini"
- Apply box-sizing to "mx_AppTile--large" only, to remove unset from "mx_AppTile--fullWidth" AND "mx_AppTile--mini"
Because "mx_AppTile", "mx_AppTile--fullWidth", and "mx_AppTile_mini" (mx_AppTile--mini) have covered all variants of AppTile and now we have "mx_AppTile" match all of them, it is no longer sensible to apply "mx_AppTile_persistedWrapper" to each selector. It can safely be nested in "mx_AppTile".
Because "mx_AppTile" class name is now globally applied, it has become redundant to apply "mx_AppTileBody" and "mx_AppTileBody--mini" to "mx_AppTile--fullWidth" and "mx_AppTile--mini", respectively. It is now fine to apply them to "mx_AppTile".

Another theoretical possibility is a combination of "mx_AppTile--fullWidth" AND "mx_AppTileBody--mini", but it does not occur in reality because "mx_AppTile--fullWidth" is not applied on miniMode.
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.

1 participant