-
-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent long names from breaking form layouts (#7591)
This PR fixes a couple instances where long resource names would break form and input layouts. I've added comments to the various files to explain what they're doing and why. ## Discussion point: I've now set the width of project selector to be as narrow as it can with wrapped text. In the main interfaces, it's much better, but on the page where you can move a flag, it is quite narrow. However, I still think it's better (no chance of it being wider than the whole screen). We might want to find another way, but regardless, it'll only show up with real edge cases. ## Fixes (screenies) ### API token creation form **Files**: - `frontend/src/component/common/FormTemplate/FormTemplate.styles.ts` - `frontend/src/component/common/FormTemplate/FormTemplate.tsx` Before: ![image](https://github.com/user-attachments/assets/cef31208-2cce-479e-902e-ed7d3c3c9571) After: ![image](https://github.com/user-attachments/assets/b0832193-11f5-427d-9df1-d9baca0a91e7) ### New feature flag form **Files**: - `frontend/src/component/common/GeneralSelect/GeneralSelect.tsx` Before: ![image](https://github.com/user-attachments/assets/2ac6f791-af19-4f7e-a8ea-2fc356f18fb2) After: ![image](https://github.com/user-attachments/assets/13b91812-c00a-49e8-9409-67fab4eaaf01) ### Project select popover **Files** - `frontend/src/component/common/GeneralSelect/GeneralSelect.tsx` - `frontend/src/component/feature/FeatureView/FeatureSettings/FeatureSettingsProject/FeatureProjectSelect/FeatureProjectSelect.tsx` Before: ![image](https://github.com/user-attachments/assets/e81a4cef-1402-4b9c-b1a8-c22493c794bd) After: ![image](https://github.com/user-attachments/assets/604dada9-6555-48e3-a81d-dda72bd9ccf0) But also: ![image](https://github.com/user-attachments/assets/7e935fe5-b7f0-4674-8d94-a8c8a6176a3c)
- Loading branch information
1 parent
7d88b90
commit e43109a
Showing
4 changed files
with
38 additions
and
8 deletions.
There are no files selected for viewing
8 changes: 7 additions & 1 deletion
8
frontend/src/component/common/FormTemplate/FormTemplate.styles.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
export const formTemplateSidebarWidth = '36%'; | ||
const sidebarWidthPercentage = 36; | ||
const formWidthPercentage = 100 - sidebarWidthPercentage; | ||
|
||
export const formTemplateSidebarWidth = `${sidebarWidthPercentage}%`; | ||
export const formTemplateFixedSidebarWidth = `420px`; | ||
|
||
export const formTemplateFormWidth = `${formWidthPercentage}%`; |
This file contains 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
This file contains 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
This file contains 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