-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Org settings layout fix + misc styling & consistency improvements #1427
Conversation
…ionality we can incrementally go through and remove these as necessary
- use appropriately colored shadows for tab list elements - prevent shadows from being clipped in tab list - use consistent copyable field styles in org settings & collection share sheet
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'm getting the following runtime error from multiple files after rebasing main:
Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
TypeError: Property consequent of ConditionalExpression expected node to be of a type ["Expression"] but instead got undefined
How do the CSS changes impact final dist file sizes?
Co-authored-by: sua yoo <sua@webrecorder.org>
Great question! I'm not actually sure, I suspect somewhat significantly. With shadow-root-enabled components we simply don't get the benefits of atomic CSS used across a codebase — as far as I understand, each shadow DOM needs its own complete css declaration as things are now. With Tailwind we could feasible share a single style sheet across the document root as well as all the shadow DOMs if we override or extend Lit's CSS handling and adopt a shared style sheet in |
@Shrinks99 is it not? I'm not really sure, to be honest — in this case, there's a number of aspects that are akin to a form element: there's a label, the text is a self-contained piece of content, and there's already a |
I think it makes sense in the context of a form, to indicate that the input value can be selected/focused on/copied. But could go either way since the value isn't sent to the server, and not sure it makes as much sense in the description list, since the |
Just tried it in voice over, the big difference is that it reads out the content of the input with tab navigation because it's selected differently from the other boxes which don't do that (because they aren't user-editible elements / controls and therefore aren't included in the tabbing order) and the next item is the copy action, not the content. The prefix icon is currently skipped and tab navigation gets stuck and doesn't work for the suffix icon. After bit of looking into form labels and poking through the Firefox web inspector, I think the answer here is that you could be right if the elements above are properly attached to the input with That being said, the current keyboard navigation and screen reader experience is far better. The link is read aloud with the first icon button and is correctly identified as a link, the second piece of text also stating the link should probably be given an We really ought to do a pass on each page to make them properly navigable without double descriptions and such... I don't have time for this cleanup sprint, but I might for the next one! |
Is this ready for re-review? |
@SuaYoo Should be, yes! @Shrinks99 just to clarify — is the existing implementation (not using |
Yeah, using the input was def not as good. Also if you're going to componentize this, depending on what actions are available, (if there's a button in the prefix slot with a link to visit the page) the text should be given |
@Shrinks99 I'd love your thoughts on this impl! |
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.
@Shrinks99 I'd love your thoughts on this impl!
Pretty friggin good! Yeet the old one from the share dialog and we're set!
Oh, yup, good catch! |
@@ -15,6 +15,7 @@ export class Alert extends LitElement { | |||
@property({ type: String }) | |||
variant: "success" | "warning" | "danger" | "info" = "info"; | |||
|
|||
// postcss-lit-disable-next-line |
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 do we need to disable postcss-lit? I'm not seeing a visible difference disabling/enabling.
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 know if we do — I'd put this disable everywhere I wasn't directly working on because I didn't want it to break anything unintentionally
Co-authored-by: emma <hi@emma.cafe>
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.
🔥
) ## General changes - Added `postcss-lit`, which allows us to use tailwind in lit elements with shadow DOMs - Added `// postcss-lit-disable-next-line` comments to most `` css`...` `` tagged templates so as not to change existing CSS in components - Added `TailwindElement`, which uses a single shared `CSSStyleSheet` across all instances to be able to access Tailwind without requiring a full copy of (compiled) Tailwind for every instance of a component that extends it - Added a new `<btrix-copy-field>` element, replacing the existing copy elements ## Org settings page - Stopped content from overflowing at medium widths - Made spacing consistent at both smaller and wider widths - Used readonly/monospace styling for copyable org id field - Updated tab shadows to be slightly blue, consistent with the tab background (also did this in other places tabs show up) Before | After -|- ![dev browsertrix cloud_orgs_default-org_settings](https://github.com/webrecorder/browsertrix-cloud/assets/5727389/9bcacdcc-259b-4a01-bac5-8913518776f0) | ![localhost_9870_orgs_default-org_workflows_crawls](https://github.com/webrecorder/browsertrix-cloud/assets/5727389/53936d4d-e5cd-4f37-ad06-b3b5041381df) ![dev browsertrix cloud_orgs_default-org_settings (3)](https://github.com/webrecorder/browsertrix-cloud/assets/5727389/602dd8d6-3012-4a0e-a638-a5192c9601ec) | ![localhost_9870_orgs_default-org_workflows_crawls (3)](https://github.com/webrecorder/browsertrix-cloud/assets/5727389/74c93312-ad26-48d8-a87e-3da9a851693b) ## Misc fixes - Used consistent single-line readonly/monospace styling for copyable url field Before | After -|- ![dev browsertrix cloud_orgs_default-org_settings (1)](https://github.com/webrecorder/browsertrix-cloud/assets/5727389/e361feeb-3ea0-4f56-9e38-12ef6a644d58) | ![localhost_9870_orgs_default-org_workflows_crawls (1)](https://github.com/webrecorder/browsertrix-cloud/assets/5727389/0145b1ad-8f45-4486-893e-8f638ac9add6) - Removed inconsistent angled bottom borders from crawl workflow list header Before | After -|- ![dev browsertrix cloud_orgs_default-org_settings (2)](https://github.com/webrecorder/browsertrix-cloud/assets/5727389/4aa20359-3ecf-4441-83c0-ed36a951ed3b) | ![localhost_9870_orgs_default-org_workflows_crawls (2)](https://github.com/webrecorder/browsertrix-cloud/assets/5727389/8c771464-3a70-47e7-8475-fa82d4d030a9) - Changes _all_ list page primary action buttons to use `variant="primary"` <img width="190" alt="Screenshot 2023-12-08 at 11 23 49 AM" src="https://github.com/webrecorder/browsertrix-cloud/assets/5672810/2b007f5e-e675-40b2-86a7-f0bf8ef83b81"> <img width="240" alt="Screenshot 2023-12-08 at 11 23 43 AM" src="https://github.com/webrecorder/browsertrix-cloud/assets/5672810/621b340e-2051-4ab0-8f42-8f0a51d8d3a5"> --------- Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics> Co-authored-by: sua yoo <sua@webrecorder.org> Co-authored-by: sua yoo <sua@suayoo.com>
General changes
postcss-lit
, which allows us to use tailwind in lit elements with shadow DOMs// postcss-lit-disable-next-line
comments to mostcss`...`
tagged templates so as not to change existing CSS in componentsTailwindElement
, which uses a single sharedCSSStyleSheet
across all instances to be able to access Tailwind without requiring a full copy of (compiled) Tailwind for every instance of a component that extends it<btrix-copy-field>
element, replacing the existing copy elementsOrg settings page
Misc fixes
variant="primary"