-
Notifications
You must be signed in to change notification settings - Fork 40
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
[UX][D8] Views "Add fields" modal: Split item title/category/description into separate columns, and streamline JS used #6355
Comments
I prefer the category: field order to field: category because it is easier to notice that Content revision: Title is not Content: Title. |
Leaving out that, in English and other left-to-right languages, the order would be With the PR, the fields list is not easier to read (for a left-to-right language) than the list as it shown now. If the list showed Title: Content and Title: Content revision as consecutive items, at least I could notice there are more Title fields without reading the full list. |
That is much better! There is no even the need to "parse" the text to look at the field name. |
This is a screenshot from my local (with Gin for Backdrop as the theme) with the latest changes to the PR: I reworked it to use a table and td separation, and largely copied a section of code from Drupal 10 to rework the search functionality to work in this new structure. (EDIT: for code review, here's a relevant section of code from Drupal 10 where much of this came from). @kiamlaluno (and @olafgrabienski -- I see that thumbs up), are you able to test this and post your feedback here? |
I've applied the PR locally and I really like the general look and feel. See the screenshots below for a comparison in Seven. As mentioned by @kiamlaluno, I also see the lines around the check boxes in the Seven theme, btw. There seems to be a regression with regards to the Search box. Without the PR, you could filter the Category by typing parts of the Category name into the search box. With the PR, this doesn't work anymore. If I didn't miss anything, the search box looks only for Title and Description now. (To test, put "Global" in the search box.) Screenshots ("Add field" dialog in Seven) (a) Without PR 4628: (b) With the PR: |
Thanks @kiamlaluno and @olafgrabienski -- I've made a revision to the PR. It does change the display slightly for Seven, with fewer high contrast border lines, making it more in line with the way Seven displays the main admin content listing. I've also added the ability to keyword filter on the group name. SevenGin |
Thanks for the update, @laryn. The revised PR works for me:
I've also had a look at the line with "Selected" fields. Looks good both in Seven and in Gin. |
It looks good to me too. |
Score one for automated testing which has revealed a breakage if you actually try to go further along from here... I'll have to come back to this one! |
@kiamlaluno @olafgrabienski Are you willing to review again? |
@laryn Sure! I've tested in the sandbox, and the PR looks good at first sight (see 1st screenshot below). But I've noticed an issue, not sure if new or if it existed before: If you don't filter the fields, the "Selected" line is somehow hidden (see 2nd screenshot). This doesn't happen with a fresh Backdrop demo. Screenshot 1: Sceenshot 2: |
Thanks for testing again @olafgrabienski! This is a fresh site with nothing selected: With the current PR, with nothing selected: In both cases, the "Selected" text does not show up when nothing is selected. Are you seeing something different? |
No, in this case I see the same. I was referring to another situation but didn't make that clear (sorry): In my second screenshot I had selected some fields (the same as in the first screenshot). The selected checkboxes are not visible, though, because their rows are further down in the not visible part of the dialog. I'm adding a new screenshot with some visible selected checkboxes to make the issue more clear. Note also the highlighted region in the screenshot where you see a small fraction of "Selected" line: |
@olafgrabienski Is that on your local with manual patching, or in the Tugboat sandbox? Here's what I'm seeing in the sandbox: |
Also sandbox ... Maybe a browser question? I was testing with Chrome on Mac. |
@olafgrabienski Here's what I see in Chrome on Mac in the sandbox generated by the PR: |
@klonos I had considered |
Hmm 🤔 ...are you sure about this @laryn? From what I can see, the checkboxes have the same |
...oh, I see, you must be referring to this:
But if we store that in a variable and we then use the same value for dirrect attributes, then that should be fine. ...or should it? ...Imma go test things 😅 |
@klonos I've added the additional text you requested in the comment. |
Thanks @laryn 🙏🏼 ...I think that this is good to go 👍🏼 I have thoughts, but these are more broad and touch on inconsistencies with the FAPI etc. - so not here - follow-ups. |
I resolved a merged conflict in the PR (we stopped using |
By @laryn, @kiamlaluno, @klonos, @olafgrabienski, @stpaultim, and @docwilmot.
By @laryn, @kiamlaluno, @klonos, @olafgrabienski, @stpaultim, and @docwilmot.
I retested the PR and everything seems to work as described. I've merged backdrop/backdrop#4628 into 1.x and 1.28.x. Thank you everyone! bf8e45e by @laryn, @kiamlaluno, @klonos, @olafgrabienski, @stpaultim, and @docwilmot. |
Description of the bug
While working on Gin I noticed that the Views modal for selecting fields or filters could use some clean up. Here are some of the things I'd like to improve:
but perhaps it would be enough to just put it after the field label? I'm curious if others agree that this is harder to read with the category inserted at the front.and the latest PR replicates that.theme_checkbox
it is very easy to break that (as Gin does) and it can be hardened with a minor tweak. Right now it looks for the label exactly following the checkbox, but (for example) Gin adds a span directly after the checkbox, so the "Selected: " interface is broken.Changing that to look for a sibling label instead of whatever happens to be directly following seems a little stronger.Code from Drupal 10 has been adapted to match the corresponding structural changes and is more robust.Steps To Reproduce
To reproduce the behavior:
Screenshot (before)
Screenshot (after)
The text was updated successfully, but these errors were encountered: