Fix project rename row overflow and button spacing (SL-2118) - #74662
Draft
cnbrenci wants to merge 1 commit into
Draft
Fix project rename row overflow and button spacing (SL-2118)#74662cnbrenci wants to merge 1 commit into
cnbrenci wants to merge 1 commit into
Conversation
Two defects when renaming a project from /projects: The name cell rendered a bare <input> with a fixed width: 200px inside a 250px-wide cell, so the box overflowed its column. Replace it with the design system TextField. Its FormFieldWrapper carries min-width: 18.75rem, which would overflow further, so the module overrides that and lets the field fill the cell instead of carrying a fixed width. id and name still land on the inner <input>, so existing UI test selectors resolve unchanged. The Save and Cancel buttons sat flush because .buttonMargin never applied: CdoTheme's MuiButton root override sets margin: 0 at equal specificity and emotion injects after the CSS module, so MUI won on source order. Move the 8px to a gap on the flex container, which the button override does not touch. Also label the rename input, which had no accessible name. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MuaaLf88HsjnU9QtqdZeB9
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two UI bugs when renaming a project from
/projects: the name box overflows its column, and the Save and Cancel buttons sit flush against each other. Both come from a style that lost a specificity fight, so this fixes the causes rather than nudging the numbers.The name box overflowed. The cell rendered a bare
inputelement with a hard-codedwidth: 200px. Withcontent-boxsizing its border and padding added another 8px, so it drew 208px inside a cell whose content box is 201px - a 7px overhang. Swapped it for the design systemTextField(MIGRATION_STATUS.mdliststextFieldas "Not Started", so DSCO, not MUI) and let it fill the cell instead of carrying a fixed width.TextField'sFormFieldWrappersetsmin-width: 18.75rem(300px), which would have overflowed the cell far worse, so the module cancels it. That override is written aslabel.inputBox- element-qualified - so it beats.formFieldWrapperon specificity instead of depending on which stylesheet webpack happens to emit last.The buttons touched.
.buttonMargin { margin-right: 8px }never applied.CdoTheme'sMuiButtonroot override setsmargin: 0at equal specificity, and emotion injects its styles after the CSS module, so MUI won on source order. The renderedmargin-righton Save was0px. Moved the 8px to agapon the flex container - a property the button override does not touch, so it cannot be undone the same way.While in the file I also gave the rename input an
aria-label; it had no accessible name.Structural change worth knowing about:
TextFieldwraps its input in alabelelement (FormFieldWrapper), so the edit cell gains one wrapper element. Theidandnamestill land on the inner input, so the existing UI test selectors (#ui-project-rename-input,#ui-projects-rename-save) resolve unchanged.Links
Testing story
Hey, human! Add screenshots here.
Before screenshot
After screenshot
Compare the private projects gallery old vs new:
use_my_apps: true): http://localhost:9000/projectsI drove the table in Storybook and measured the rendered geometry rather than eyeballing it. At 768 / 1024 / 1280 / 1568 the numbers were identical:
margin-righton SaveI could not reach a real
/projectspage from my environment - it needs MySQL and AWS credentials I do not have - so everything below is on you:/projects: the box stays inside its column, Save writes the new name, Cancel discards it.gaprather thanmargin-right, which is direction-agnostic, so this should be no worse than before.Make sure you ask design:
size="s"on theTextField, matching thesize="s"already on the project-name link in the same cell. That makes the input a bit more compact than the old bare browser input. Issthe right size for this row, or would you rather havem?