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

Correct text and icon alignments in server audit dialog #10925

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

banobepascal
Copy link

Change-Id: Id4b45e9097b8ba77df5280bedf1635693fce72fc

Summary

Improvements in alignment of icons and text in the server audit dialog

IN (COOLWSD version: 24.04.8.1(git hash: 8475197 (E))

image (2)

AFTER: #10870

Screenshot from 2025-01-14 03-29-37

CURRENT FIX AND IMPROVEMENT

Screenshot from 2025-01-13 16-05-13

Screenshot from 2025-01-14 02-20-31

Checklist

  • I have run make prettier-write and formatted the code.
  • All commits have Change-Id
  • I have run tests with make check
  • I have issued make run and manually verified that everything looks okay
  • Documentation (manuals or wiki) has been updated or is not required

@banobepascal
Copy link
Author

@pedropintosilva please review, and I would also like your feedback on "No issues found" styling

@caolanm caolanm force-pushed the private/banobepascal/server-audit-dialog branch from 25ff897 to 4b37e37 Compare January 14, 2025 08:24
@banobepascal banobepascal force-pushed the private/banobepascal/server-audit-dialog branch 3 times, most recently from 2c65ee5 to 0294109 Compare January 19, 2025 22:42
@banobepascal
Copy link
Author

Screenshot from 2025-01-20 00-37-53

Screenshot from 2025-01-20 00-38-34

@pedropintosilva advise on the darkmode icon.

@pedropintosilva
Copy link
Contributor

Screenshot from 2025-01-20 00-37-53

Nice, Maybe the indicator could look more line one element (distinct from the others rows and compound by icon and text) if the text would be set with the same dark green as the outer circle of the new icon. Another option would be to keep the text black but set a subtle green background that encompasses both the icon and the text. You need to see what it's better in terms of being distinct enough to be perceived as an indicator of the overall status and subtle enough to don't be confused by a button or other component that requires an active action from the user via the UI.

Screenshot from 2025-01-20 00-38-34

Please create another icon for dark mode purposes that should be uploaded to the dark subfolder under images. The current icon doesn't look very readable (specially with the white inner path vs green outer shapes vs dark bakcground)

@pedropintosilva advise on the darkmode icon.

Also, I didn't see changes WRT how it looks when there is an error, please attach a screenshot if you can

Copy link
Contributor

@pedropintosilva pedropintosilva left a comment

Choose a reason for hiding this comment

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

^

@pedropintosilva
Copy link
Contributor

I also see that there is only one commit, maybe it would be better to have one single commit (PR) that fixes the issue (linked in the description) so we can merge it as soon as it passes CI and then another PR with further UX improvements

@eszkadev eszkadev added the draft label Jan 20, 2025
@banobepascal banobepascal force-pushed the private/banobepascal/server-audit-dialog branch 2 times, most recently from a736f0e to 9fe955d Compare January 20, 2025 16:24
@banobepascal
Copy link
Author

I also see that there is only one commit, maybe it would be better to have one single commit (PR) that fixes the issue (linked in the description) so we can merge it as soon as it passes CI and then another PR with further UX improvements

Screenshot from 2025-01-21 09-41-43

Alignments of Icons, and Text in the server dialog

Will be creating another PR for UX improvements on the Status

@pedropintosilva pedropintosilva self-requested a review January 21, 2025 08:56
Copy link
Contributor

@pedropintosilva pedropintosilva left a comment

Choose a reason for hiding this comment

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

image
It seems that now the dialog can become too narrow resulting in this ^

Also we could make sure that the text wraps if needed

@banobepascal banobepascal force-pushed the private/banobepascal/server-audit-dialog branch from 9fe955d to 747b84c Compare January 21, 2025 20:37
@banobepascal
Copy link
Author

Screencast.from.21-01-25.23.22.14.webm

@banobepascal banobepascal force-pushed the private/banobepascal/server-audit-dialog branch from 747b84c to e2c22b3 Compare January 22, 2025 05:13
@banobepascal
Copy link
Author

@pedropintosilva please review

Copy link
Contributor

@pedropintosilva pedropintosilva left a comment

Choose a reason for hiding this comment

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

Additionally it seems there is a max-height being set elsewhere and the min-width of the #ServerAuditDialog-mainbox doesn't need to be so wide by default. Bellow is a the diff patch that I ended up having locally while reviewing your changes. Feel free to apply it with git apply pedroChangesOnTopOf10925pr.txt

pedroChangesOnTopOf10925pr.txt

Comment on lines 546 to 548
grid-template-columns: auto 1fr 180px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I see 2 problems here:

  • I would prefer to avoid hard coded pixels and instead use ratios
  • Where I'm missing a pixel value is on the initial column (the icon)
grid-template-columns: var(--btn-img-size-s) 6fr 3fr;

Copy link
Author

Choose a reason for hiding this comment

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

Changed from pixel to ratios and used --btn-img-size-m as the ratio for the first column

browser/css/jsdialogs.css Show resolved Hide resolved
Comment on lines 578 to 579
grid-template-columns: auto 1fr 170px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I see 2 problems here:

  • I would prefer to avoid hard coded pixels and instead use ratios
  • Where I'm missing a pixel value is on the initial column (the icon)
grid-template-columns: var(--btn-img-size-s) 6fr 3fr;

Copy link
Author

@banobepascal banobepascal Jan 22, 2025

Choose a reason for hiding this comment

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

Used 0fr to remove space for the unused icon instead of var(--btn-img-size-s)

browser/css/jsdialogs.css Show resolved Hide resolved
Comment on lines 581 to 582
#ServerAuditDialog .ui-treeview-icon {
margin-inline-end: 2px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need margins if we use column-gap as in:

.ui-treeview-headers,
+.ui-treeview-entry {
+	column-gap: 8px;
+}

Copy link
Author

Choose a reason for hiding this comment

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

removed margin-inline-end

Comment on lines 585 to 586
#ServerAuditDialog .ui-treeview-headers div.ui-treeview-icon-column {
margin-inline-end: 4px;
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need margins if we use column-gap as in:

.ui-treeview-headers,
+.ui-treeview-entry {
+	column-gap: 8px;
+}

Copy link
Author

Choose a reason for hiding this comment

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

Removed margin-inline-end

#ServerAuditDialog .ui-treeview-entry > div:nth-last-child(1) {
margin-inline-start: 8px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't need margins if we use column-gap as in:

.ui-treeview-headers,
+.ui-treeview-entry {
+	column-gap: 8px;
+}

Copy link
Author

Choose a reason for hiding this comment

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

Using column-gap: 8px on ui-treeview-headers adds a gap between all three grid items, but we want to avoid adding extra space between the icon column and the status.

@@ -2214,6 +2238,7 @@ kbd,

#ServerAuditDialog .ui-treeview {
border-color: transparent;
max-width: fit-content;
Copy link
Contributor

Choose a reason for hiding this comment

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

If previous comments I added we don't need this.

Copy link
Author

Choose a reason for hiding this comment

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

Removed max-width, but added max-height to max-content as the max-height was capped at 150px


.jsdialog:not(.sidebar).ui-treeview {
   max-height: 150px; 
}

Copy link
Author

Choose a reason for hiding this comment

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

@pedropintosilva please review

@banobepascal banobepascal force-pushed the private/banobepascal/server-audit-dialog branch from e2c22b3 to 6b32f3e Compare January 22, 2025 17:36
reduced the width of the server audit dailog as it doesn't
need to be so wide by default.

set a max-height to max content for server audit dialog

Signed-off-by: Banobe Pascal <[email protected]>
Change-Id: Ie7fa03d0009a55fb437417959c1f7d941b8c816f
@banobepascal banobepascal force-pushed the private/banobepascal/server-audit-dialog branch from 6b32f3e to 8b7a893 Compare January 22, 2025 19:37
@pedropintosilva pedropintosilva self-requested a review January 23, 2025 13:06
Comment on lines +588 to +590
#ServerAuditDialog .ui-treeview-headers > div:nth-last-child(1) {
margin-inline-start: 7px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer to don't added this margin. I would prefer to add the inherited margin from the entries only when there is a single column, rather than applying the margin here to align with the entries. But let's merge this for now and we cna discuss this later.

@pedropintosilva pedropintosilva merged commit 7a50f22 into master Jan 24, 2025
14 checks passed
@pedropintosilva pedropintosilva deleted the private/banobepascal/server-audit-dialog branch January 24, 2025 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Audit dialog has unwanted grey dot icons and wrong text alignment
3 participants