Skip to content
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

Modals and Forms Visual Updates #3798

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open

Conversation

ghislaineguerin
Copy link
Contributor

@ghislaineguerin ghislaineguerin commented Aug 28, 2024

Changes

Modals Update

I've been improving modals across Mathesar to ensure consistency, better usability, and adherence to design guidelines. Here's a summary of the changes and improvements:

Alignment and Spacing Issues

  • Modal Headers: The prominence of modal headers has been increased to ensure balance with the footers, as there was insufficient visual weight at the top.
  • image
  • The modal title size is now consistent and larger than content headings. This issue was especially noticeable in the Constraints modal, where the headers inside the modal were larger than the modal header.
    image
  • Close Button Alignment: The close button is now correctly aligned with the start of the title in all modals.
  • image
  • Collapsing Headers: In Constraint modals, collapsing headers were adjusted to maintain a consistent height, regardless of whether a button is present.
  • image

Styling and Contrast Issues

  • Form Field Labels: Improved the contrast of form field labels to distinguish them clearly from body text.
  • image
  • Message Boxes: Updated the style of message boxes to have a less boxy appearance, improving the flow of content and reducing vertical separations that make content harder to scan.
  • image
  • Inline Forms and Descriptive Button Labels: Inline forms were used to add foreign or unique keys, and redundant titles were removed. Instead, the save button labels were updated to indicate the action, such as adding a new object.
  • image

Consistency Enhancements

  • Input Box Style: Ensured consistency in using boxed input groups, applying the same style across different modals, such as import modals and database creation modals.
    • image
  • Modal Descriptions: Standardized the placement and presentation of descriptions.xw

Create Link Updates

The "Create Link" modal has been revised to enhance clarity and maintain consistency with other forms in the app.

  • Outcome Box Update: Each outcome now has its own collapsible section containing a single, concise outcome statement. Previously, the outcome box listed all the input boxes for naming every element involved, which cluttered the interface. If the user agrees with the default outcomes, they won't need to interact with these input boxes. This change reduces visual distractions and makes it easier to review the outcomes which was the main goal for this special message box.
  • Updated Labels: Labels have been revised to follow the new naming convention for new elements. For example, fields now use phrasing like "Name of new column" instead of "New column name".
  • image
  • image

Guidelines

https://hackmd.io/0MNSBOSoRUC0cnYEqMj9eA?edit

Copy link
Contributor

@seancolsen seancolsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me so far! I added a couple small comments.

@@ -190,7 +194,7 @@
onProceed={handleSave}
onCancel={onClose}
size="small"
proceedButton={{ label: $_('add') }}
proceedButton={{ label: $_('Add Foreign Key Constraint') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i18n keys should be in snake_case

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will update, thanks.

@@ -300,10 +300,10 @@
text={targetTableName
? $_('columns_removed_from_table_added_to_target', {
values: { count: $columns.length },
})
}) + ' A link column will be created to maintain the relationship between records.'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you finish putting all your strings into dict.json, make sure you don't have any post-translation string concatenation like this.

Comment on lines 147 to 149
p {
line-height: 1.5;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a little odd to me. I'm fine with changing the line height. But I wouldn't expect us to customize it specifically for paragraphs. We don't even use <p> very often in Mathesar. So I'm worried that this CSS will lead to inconsistent style.

Can you explain why you set this here?

I'd typically expect to see line-height set on a very high-level element like html and then for it to sometimes be overridden for elements like headings.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The blocks of text were too tight and I was concerned about making this a global change in case it affected buttons or other elements like the pills. I will consider your feedback and try adjusting it globally.

@ghislaineguerin ghislaineguerin changed the title Visual and Consistency Improvements Modals and Forms Visual Updates Sep 10, 2024
@ghislaineguerin ghislaineguerin marked this pull request as ready for review September 10, 2024 11:50
Copy link
Contributor

@kgodey kgodey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I only looked at the PR description, not the code.)

This looks great @ghislaineguerin, very nice work! Just one small piece of feedback.

366027524-64007861-a1c9-49c8-bc11-fa57eee93d06

Copy link
Contributor

@seancolsen seancolsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've not thoroughly review the changes from a stylistic or aesthetic perspective because I don't expect to have strong opinions about that and I trust Ghislaine's judgement here.

But I did add some critique on the code pointing out some i18n issues.

@seancolsen
Copy link
Contributor

Heads up that in c23d673 I resolved some merge conflicts with Collapsible.scss that seemed straightforward to me. I wanted to get the code updated in the branch in order to merge into the dependent PR #3805 so that I could test it.

@seancolsen
Copy link
Contributor

Some more things I noticed:

  • This UI was more concise before:

    Before After
    image image

    I think the simpler version is clearer and easier to read.

  • Some UI element within the Create Link dialog is not responding well to narrow viewports, causing overflow.

    Prior to these changes, this UI shrunk to narrow viewports quite well.

    Not that I think this is particularly important right now. But it would be good to trace the root cause of this change since it's possible that it's a low-level change that could have other consequences as well.

@seancolsen seancolsen removed their assignment Sep 16, 2024
@pavish pavish assigned ghislaineguerin and unassigned pavish Sep 17, 2024
@pavish pavish added the pr-status: revision A PR awaiting follow-up work from its author after review label Sep 17, 2024
@ghislaineguerin
Copy link
Contributor Author

@seancolsen
I agree with your review of the outcome box in the Create Link modal. My initial idea was to consolidate the actual outcomes at the top so that the user is not distracted by all the visual clutter. However, adding the help text to the input boxes didn't really accomplish that. I've been thinking more, and I've pushed a new version that aims to make the user goal of "knowing what changes" more efficient. I think we should aim to show outcomes that we feel are reasonable, and if the user wants to change them, they can interact. Otherwise, the main goal is fulfilled for most.

@seancolsen
Copy link
Contributor

@ghislaineguerin cool. Is this ready for re-review then?

@seancolsen seancolsen self-assigned this Sep 18, 2024
@seancolsen seancolsen added pr-status: review A PR awaiting review and removed pr-status: revision A PR awaiting follow-up work from its author after review labels Sep 18, 2024
@kgodey kgodey added this to the Pre-beta test build #1 milestone Sep 18, 2024
@kgodey
Copy link
Contributor

kgodey commented Sep 19, 2024

Has my review comment also been addressed?

@ghislaineguerin
Copy link
Contributor Author

@seancolsen Yes, it is ready now.

@kgodey Yes, It is solved because I kept the inline layout for the new column input. I've moved away from using the help descriptions inside outcomes as it fractures the outcome text. The label is now clearly differentiated from the content. See below.

image

@kgodey
Copy link
Contributor

kgodey commented Sep 19, 2024

Looks good @ghislaineguerin but are we losing the colors for the table names?

@ghislaineguerin
Copy link
Contributor Author

@kgodey we only had colors in the context for the Create Link dialog.

@kgodey
Copy link
Contributor

kgodey commented Sep 19, 2024

Ah right, sorry @ghislaineguerin, wasn't paying enough attention.

@seancolsen seancolsen removed their assignment Sep 20, 2024
@seancolsen seancolsen added pr-status: revision A PR awaiting follow-up work from its author after review and removed pr-status: review A PR awaiting review labels Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-status: revision A PR awaiting follow-up work from its author after review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants