[pull] main from tldraw:main#601
Merged
Merged
Conversation
This PR reduces dead code in the dotcom client and tidies up several dialogs. Most of the diff is dead-code removal with no behavior change; the dialog work is a small set of deliberate sizing, layout, and copy tweaks. ### Dead code removal Every removed rule, component, export, and the `warning` button variant was verified to have no remaining references in the codebase. - Unused CSS across admin, sidebar, dialogs, auth, menu, editor, share zone, document name, and globals stylesheets. - The `warning` variant from `TlaButton` and its consumers (`admin.tsx`, `file-share-menu-primitives.tsx`). - The orphaned `ExternalLink.module.css` and `icon.module.css` wrapper rules. - Unused components/exports: `LegacyLinks`, `TlaIconWrapper`, `ColorThemeSubmenu`, `DotDevMenuItem`, `TldrawAppUiEventsProvider`, and `shouldClearDocument`, plus their now-unused messages. ### Dialog tweaks - Prevent the invite sign-in dialog from being dismissed by clicking the background overlay. - Use 36px inputs and buttons in the auth dialog (was 40px). - Add a `big` (36px) variant to `TlaButton` and normalize the workspace settings dialog sizing, label rows, and invite-link buttons. - Tighten invite and sign-in copy, and adjust the create-workspace dialog field layout. - Simplify the menu switch hover styles. ### Change type - [x] `other` ### Test plan Mostly dead-code removal with no behavior change; verified by confirming no remaining references to any removed CSS class, component, export, or the `warning` variant. Smoke-test the dotcom client to confirm no visual regressions in the affected areas (admin, sidebar, dialogs, auth, menus, editor), that the invite sign-in dialog cannot be dismissed by an overlay click, and that auth/settings inputs and buttons render at the new 36px sizing. ### Code changes | Section | LOC change | | ------- | ---------- | | Apps | +59 / -878 |
In order to fix the empty "Manage workspace" dialog shown for the home
workspace ("My workspace") that #9168 introduced — and to bring the
dialog back in line with its pre-#9168 design — this PR restores and
polishes the manage workspace dialog. Opening "Settings" for the home
workspace returned `null` (a dimmed page with no content) while the
sidebar still opened it. The home workspace is private (its group id
equals the owner's user id): it can be renamed, but not shared, joined,
deleted, or have its members managed.
Changes:
- **Home workspace** — shows a rename-only view (the name field plus a
disabled invite control and the note "This is your private workspace.
Create a new workspace to invite teammates.") instead of an empty
dialog; the Members and Settings tabs are hidden. Resolves the Cursor
Bugbot "Home workspace settings empty" flag on #9168.
- **Members tab** — dropped the "({count})" suffix; the rework added it,
but the pre-#9168 label was just "Members".
- **Settings tab** — Regenerate / Leave / Delete are now left-aligned
text-link buttons, and the negative-margin/padding alignment hacks are
gone, so their labels line up with the toggle and the section headings.
The shared `.menuControlRow` 4px nudge is disabled (it threw off that
alignment; it's also used by the file share menu and the cookie dialog).
- **Invite buttons** — apply the `big` `TlaButton` variant (added on
main in #9261) to all three invite buttons so they keep a consistent
size across enabled/disabled states, and use the secondary-disabled
treatment for the "invites off" state, matching the home workspace's
private invite button.
Merged with `main` (#9261), which independently added the `big` variant
and cleaned up the dialog CSS; this branch uses main's `big` rather than
its own.
### Change type
- [x] `bugfix`
### Test plan
Covered by e2e regression tests in `ui.scenario.spec.ts`:
1. Home workspace settings render the private rename view (editable
name, the private-workspace note, a disabled "Copy invite link", and no
Members/Settings tabs) rather than an empty dialog.
2. The home workspace can be renamed from the dialog.
3. A shared workspace still shows the invite link and the
Members/Settings tabs (existing coverage, updated for the countless
"Members" label).
- [ ] Unit tests
- [x] End to end tests
### Release notes
- Fix the empty settings dialog shown when opening settings for your
personal "My workspace"; it now shows the workspace name (editable) and
a note that it's private.
- Polish the manage workspace dialog: a simpler "Members" label,
link-style settings actions, and consistently-sized invite buttons.
### Code changes
| Section | LOC change |
| --------------- | ----------- |
| Apps | +234 / -184 |
| Tests | +56 / -1 |
| Automated files | +18 / -17 |
…9284) In order to polish the manage workspace dialog from #9268, this PR makes the tab-page scrollbar appear only when content actually overflows, sizes the dialog body so it stops jumping around, and tidies a few labels and disabled-state styles. - Scrollbar only appears when a tab page actually overflows. The container stays `overflow: hidden` and a `useScrollbarWhenScrollable` callback ref measures the content with a `ResizeObserver`, adding a `.scrollable` class that flips to `overflow: auto` only when needed. This avoids a permanent scrollbar/gutter on systems that always render scrollbars. - Sized the dialog body with a `max-height`/`min-height` so it doesn't jump around as content changes. - Renamed the sidebar workspace action label from "Settings" to "Manage". - Renamed the "Enable invite link" label to "Enable invites". - Disabled inline buttons now dim via text color instead of opacity. - Bumped the empty-state text contrast (`text-3` → `text-1`). ### Change type - [x] `improvement` ### Test plan 1. Open the manage workspace dialog from the sidebar "Manage" action. 2. With few members, confirm neither tab page shows a scrollbar or gutter. 3. Add members until a tab page overflows and confirm the scrollbar appears only then. 4. Switch between the Members and Settings tabs and confirm the dialog body height stays stable. 5. Confirm disabled inline buttons dim and the "Enable invites" label reads correctly. - [ ] Unit tests - [ ] End to end tests ### Release notes - Polish scrolling and layout in the manage workspace dialog. ### Code changes | Section | LOC change | | ------- | ---------- | | Apps | +40 / -11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )