-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Move Flex & Box component into shared component folder #30357
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
Conversation
3500418 to
0d17e61
Compare
0d17e61 to
926bee6
Compare
| line-height: $font-25px; | ||
|
|
||
| /* E2E icon wrapper */ | ||
| .mx_Flex > span { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem to be used anymore
| fdroidUrl?: string; | ||
| }> = ({ appleAppStoreUrl, googlePlayUrl, fdroidUrl }) => ( | ||
| <Flex gap="var(--cpd-space-6x)"> | ||
| <Flex gap="var(--cpd-space-6x)" className="mx_Flex"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Override already declared here:
element-web/res/css/structures/ErrorView.pcss
Lines 53 to 58 in 0b6d270
| .mx_Flex { | |
| margin: 0 auto; | |
| max-width: max-content; | |
| flex-wrap: wrap; | |
| justify-content: space-evenly; | |
| } |
Adding the class manually since the Flex component use a css module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in which case this class should be changed to something scoped to mx_ErrorView
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
926bee6 to
5feef11
Compare
7883e22 to
b179cfe
Compare
t3chguy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Box should be taken with it, given it is the same style of component
| /* | ||
| Copyright 2024 New Vector Ltd. | ||
| Copyright 2023 The Matrix.org Foundation C.I.C. | ||
| * Copyright 2025 New Vector Ltd. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this can just shed the old copyrights given the majority of the file hasn't changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 7b4f240
| SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial | ||
| Please see LICENSE files in the repository root for full details. | ||
| */ | ||
| * Copyright 2025 New Vector Ltd. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <div class="mx_MatrixChat"> | ||
| <main class="mx_RoomView"> | ||
| <div class="mx_Flex mx_RoomHeader light-panel"> | ||
| <div class="mx_RoomHeader light-panel"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flex class name not showing up in snapshots seems like an issue, you can't differentiate between a div and a Flex container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can keep a dummy mx_Flex classname in the Flex component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the css module classname not visible? it is for e.g. Compound components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, I suppose we are missing some jest/webpack configuration. In compound we are using vitest using the vite conf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://jestjs.io/docs/webpack#mocking-css-modules seems the way to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
65e15b4 to
a38ec2b
Compare
b0d5b7a to
d041219
Compare
d041219 to
a447d51
Compare
|
I moved the |
richvdh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't checked the detail of most of the changes, but the crypto stuff looks fine
) * refactor: move Flex component in shared components * refactor: update imports * refactor: remove Flex pcss file * fix: Flex component css override * test: update snapshots * fix: html export * chore: add css module support to jest * chore: keep old copyright * refactor: change `mx_Flex` in `ErrorView` to `mx_ErrorView_flexContainer` * test: update snapshots * refactor: move Box component in shared components * refactor: update import and css override * test: update snapshots
Flex&Boxcomponents will be used by some shared components (ongoing PRs). This PR: