-
Notifications
You must be signed in to change notification settings - Fork 367
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
Fixed the issue where long values overflowed the modal in the pages u… #8640
base: master
Are you sure you want to change the base?
Conversation
…nder the "Administration" tab in the UI.
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.
@@ -9,6 +9,7 @@ import {SearchIcon} from "@primer/octicons-react"; | |||
import {useAPI} from "../../hooks/api"; | |||
import {Checkbox, DataTable, DebouncedFormControl, AlertError, Loading} from "../controls"; | |||
|
|||
import "../../../styles/globals.css" |
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.
Is this required? IIUC it's importet in main.tsx
which should be enough...
This comment goes for all other files where this import exists
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.
you're right it works without the import
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.
Great first big PR -
Really nice effort mapping the issues, looking around, and getting to a complete solution.
Some notes:
- Agree with @guy-har 's comment about limiting the width of the checkbox.
- You should consider splitting this PR into one with the specific changes, and one with the general ones, that will apply multiple components. Since changing global components (potentially) affects the whole app, I think it's better to have a separate PR and discussion for it.
- Nit: better to have a shorter title for the PR, for better readability. 😊
Anyway, nice work 💪
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.
Generally speaking, we should try to avoid using globals.css as much as possible.
Historically it's been used quite heavily, but there's a task to change this.
The reasoning behind it is to let the bootstrap framework do all the UI work for us, and "guide" it using bootstrap classes. When we're using global classes, it's easy to fix one thing while breaking another one. Using the bootstrap classes gives us more confidence that the maintainers of the framework already checked this on different components.
I would start with the table component, and see which of these you can utilize.
Anyway, classes should be added to globals.css
only as a last resort.
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.
Although it's tempting, please try to avoid re-formatting the whole file (unless you're changing big parts of it).
It makes reviewing harder, and messes with the git history.
There is a plan to apply auto-formatting on the React code, but it's not applied yet.
@@ -43,7 +44,18 @@ const UserCredentialsList = ({ userId, after, onPaginate }) => { | |||
</> | |||
); | |||
|
|||
const getMsg = (email) => <span>Create new credentials for user <strong>{email}</strong>?</span>; | |||
const getMsg = (email) => ( |
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.
Can you please explain this change?
…nder the "Administration" tab in the UI.
Closes #8489
Issue
Long values overflowed modal windows across multiple pages in the "Administration" tab. Initially reported for one modal, but found in Users, Groups, and other sections (for other sections I opened another issue).
Fix
Changes Made
1. "Add to Group" Pop-up (Groups -> click on some group name -> Add Members)
Updated the DataTable component to prevent overflow.
Changed in files:
webui/src/lib/components/controls.jsx (DataTable)
webui/src/lib/components/auth/forms.jsx (AttachModal)
The issue screenshot:
Fix:
Note
This pop-up is implemented using a "DataTable" and AttachModal, which is also used in other functions.
For example it fixed in addition this issue:
![long_group_name_issue_1](https://private-user-images.githubusercontent.com/44980761/412088174-716f4f92-6a46-4b65-9ded-4a80e3e91237.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTQ1OTMsIm5iZiI6MTczOTU5NDI5MywicGF0aCI6Ii80NDk4MDc2MS80MTIwODgxNzQtNzE2ZjRmOTItNmE0Ni00YjY1LTlkZWQtNGE4MGUzZTkxMjM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA0MzgxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZmM2QyNzU5NWMzYWY4YTg2ZWUyZWMyNjA2ZDkzNGEzMGY5YTg5ZmQwOGVlMDA2MWVjOGRlYjE0MzMzNmNjMzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.b-4nS59fHq5k6cPC7LylOjNjvH8KjhnphxYJAvf75FY)
![long_group_name_issue_2](https://private-user-images.githubusercontent.com/44980761/412088199-8f2a164a-fda0-4bb8-a1dd-4d454193b649.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTQ1OTMsIm5iZiI6MTczOTU5NDI5MywicGF0aCI6Ii80NDk4MDc2MS80MTIwODgxOTktOGYyYTE2NGEtZmRhMC00YmI4LWExZGQtNGQ0NTQxOTNiNjQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA0MzgxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwYTFlMjU1MjY2YWRiYTMzOGUzZjY3NjMwYmFhN2I2YTM4Mjg3ZGQ5YzMxN2FmOGNjOTQ5NDBhOGM0MDM2NjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.abnyo5giU6mYlthy5hGpG-nzL0RU2e_Sfvwr6MWpWfg)
Issue:
Fix:
![long_group_name_fix](https://private-user-images.githubusercontent.com/44980761/412088227-5833eb51-cd4e-4ba1-ba5e-00fb1f905595.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTQ1OTMsIm5iZiI6MTczOTU5NDI5MywicGF0aCI6Ii80NDk4MDc2MS80MTIwODgyMjctNTgzM2ViNTEtY2Q0ZS00YmExLWJhNWUtMDBmYjFmOTA1NTk1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA0MzgxM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY1YjRlYTc2MjQ0NWZhYzBkY2U2MWMzODYwMTg4YTZlM2FiOTNjOTQwZTM3M2FmODVhY2JiNWEwYTUwNzAwZTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.0J6fxogvC5Q37kUBmPKFqOumxHSD9vd2zbgiMOd8yjE)
2. "Groups" Page (Groups -> Group Name) "Users" Page (Users -> User Name)
Fixed GroupHeader, PolicyHeader, UserHeader overflow.
Changed in files:
webui/src/lib/components/auth/nav.jsx (GroupHeader, PolicyHeader, UserHeader)
The issue screenshot:
Fix:
3. Fixed user name overflow in confirmation pop-up (Users -> selecting a user with a long name -> Access Credentials -> Create Access Key)
Changed in files:
webui/src/pages/auth/users/user/credentials.jsx (getMsg function)
The issue screenshot:
Fix:
Testing
Verified on lakeFS OSS using local DB & object store.