Problem/Motivation

In #3280706: Remove svelte-split-pane, replace with custom CSS, the responsiveness is cleaned up which makes the categories filtering stack on top of the cards on a smaller screen. This issue is to make the categories collapsable on smaller screens so it doesn't take up the entire screen.

Steps to reproduce

Proposed resolution

Make the categories collapsable in a hamburger menu or etc. when the screen is small. Probably something similar to this on the browsing page.

Remaining tasks

  • ✅ File an issue about this project
  • ☐ Addition/Change/Update/Fix to this project
  • ☐ Testing to ensure no regression
  • ☐ Automated unit/functional testing coverage
  • ☐ Developer Documentation support on feature change/addition
  • ☐ User Guide Documentation support on feature change/addition
  • ☐ Code review from 1 Drupal core team member
  • ☐ Full testing and approval
  • ☐ Credit contributors
  • ☐ Review with the product owner
  • ☐ Release

User interface changes

API changes

Data model changes

Release notes snippet

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hooroomoo created an issue. See original summary.

hooroomoo’s picture

bnjmnm made their first commit to this issue’s fork.

bnjmnm’s picture

Status: Active » Needs review
StatusFileSize
new119.81 KB

With the MR: On narrow viewports, the categories collapse into a details element. There's currently no designs for mobile but this isn't pretending to be the official design. This is to address the several-scrolls of categories for mobile users using as much native html as possible.

There's a bit of opinoinated-ness in the MR, though. Some views classes were removed from elements because they largely (or only) added styling that was then un-styled in the Svelte component. If a class is adding styles we have to revert, it's probably better to remove the class. There will probably be more culling of views classes in future issues to simplfy component styling.

bnjmnm’s picture

Issue tags: +Project Browser MVP
chrisfromredfin’s picture

Title: Categories filtering takes up a lot of space on mobile/smaller screens » Make categories filter usable on mobile; remove extraneous classes

I believe we should take the opportunity to clean up unused classes so I've updated the title. :)

I think this is the right approach; if there's somethign in Claro we can use, use it. If we can't, make it as natively-supported as possible.

My only feedback is that I believe the categories are "secondary" to the main keyword search in the UI hierarchy, so I would be happier if we could put the Categories details element after the keyword search. With that said, now that we've moved the markup around in terms of pulling the categories up, I assume this is a lot harder. Does @hooroomoo have any ideas about how to refactor that with grid or something so we can re-flow without JS?

fjgarlin’s picture

Status: Needs review » Needs work
chrisfromredfin’s picture

Taking back what I said after talking to @bnjmnm in Slack today - switching source order with Grid is not accessible so I say for now let's just keep categories above.

fjgarlin’s picture

Assigned: Unassigned » bnjmnm

There is still one line that contains old changes. I made a comment saying what should be the right line.

chrisfromredfin’s picture

I made the suggested fix, but it now needs a rebase that I'm not in tune with.

bnjmnm’s picture

Status: Needs work » Needs review
bnjmnm’s picture

Assigned: bnjmnm » Unassigned
hooroomoo’s picture

Assigned: Unassigned » hooroomoo
hooroomoo’s picture

Assigned: hooroomoo » Unassigned
Status: Needs review » Needs work

Manually tested and works great. Found one nit in code but otherwise it looks good to me. Can probably self-RTBC after.

narendraR made their first commit to this issue’s fork.

narendrar’s picture

Hi @bnjmnm, is making categories as Fieldset make them more accessible, as done in https://www.drupal.org/project/project_browser/issues/3282700? If Yes, we can copy changes done in that ticket and close that ticket.

bnjmnm’s picture

Status: Needs work » Needs review

Re #17

Hi @bnjmnm, is making categories as Fieldset make them more accessible, as done in https://www.drupal.org/project/project_browser/issues/3282700? If Yes, we can copy changes done in that ticket and close that ticket.

Using fieldset to group the checkboxes is a good accessibility improvement so it should happen. It would not, however, solve the issue being addressed here, which is too much screen area devoted to category checkboxes on smaller devices. These changes will not conflict with one another, and solve different problems, so lets do both and keep them in their respective issues.

hooroomoo’s picture

Status: Needs review » Reviewed & tested by the community

chrisfromredfin’s picture

Status: Reviewed & tested by the community » Fixed

Big improvement, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.