Skip to content

Conversation

@DiegoPino
Copy link
Member

@DiegoPino DiegoPino commented Jan 10, 2024

See #400

This is ready to be tested.

New settings:

image

Classic mode basically uses JS for everything but keeps the sequential logic of fields named with a suffix _$count and ordered. Does not solve the other need (facet summaries)

@DiegoPino DiegoPino self-assigned this Jan 10, 2024
@DiegoPino DiegoPino linked an issue Jan 10, 2024 that may be closed by this pull request
@DiegoPino DiegoPino added this to the 1.4.0 milestone Jan 10, 2024
@DiegoPino
Copy link
Member Author

DiegoPino commented Jan 10, 2024

Notes for myself:

  • On the Exposed filter I need to keep track if previously "search" was pressed and kinda build a "bookmark" for that. Because on add/remove I still need to submit the form to the views. And if not, every action will trigger a search, but if I don't want that, and e.g I want to keep the previous result of a search visible (bc if not adding fields will blank the results right) I need to know what were the last submitted values. This can be a hidden field? Could be

We don't act on these yet. On classic mode the default behavior (invisible to the user) will be to render all allowed filters BUT hide them initially. That way the plus and minus signs really only do "show/hide" and unset values instead of depending on a complex logic on the Actual exposed form handler for the filter. This also allows the Filter still have full control of how many/naming, etc. All this via JS
…idding

(visually hidden v/s hidden via js?) or data attributes? not sure yet
'aria-hidden' = TRUE allows us to also hide them for screen readers. If not this is just too confusing for an enduser
…c mode

Works. No submit until user presses "Apply" or search or whatever the "op" button is named. But... i still need to refine the remove logic. Bc as "requested" there could be a MINUS button per sub filter, which means also, when someone presses [add]. i Basically need to reorder the values so there are no "empty" gaps which right now happens when i hide/unhide elements,. Baby steps @alliomeria
@DiegoPino DiegoPino marked this pull request as ready for review January 15, 2024 21:33
@DiegoPino
Copy link
Member Author

marked this as ready for review bc the logic works 100%. With improved JS. But, the UX need still work. Why?

  • The "Classic" mode:
    • Instead of only outputting the Field Count based on the current state, we output all Fields but hide the ones that are not yet requested to be seen. That way, via JS (Add More/Remove) buttons I can selectively show/hide based on a fixed number of elements without submitting. BUT. If e.g I remove one (let's say the 3rd of 6) and then add one again, I will simply "reshow" that hidden third, which will leave a gap in the UX. What I need to do is to traverse all (now 4) and move values from e.g the 4th into the 3rd... that way the gap is not there and I have a new/fresh one at the end.... just cosmetics..but this whole pull is cosmetics...

…istent order

(i tried, god knows i tried @alliomeria) but, i can shift and move values so i can always remove from the end, add to the end, but delete the value from the actual position i am requested and via JS move values one step down. Which in UX terms i like if i had actually removed the specific field...
…st one now

Edge case, the last one is the current one... deal with that Diego
@alliomeria this will be ready to test tomorrow 9AM
Yay diego, yay
And now i got it right advanced_search_multiple_remove
@DiegoPino DiegoPino added enhancement New feature or request Javascript Favourite language of a PHP developer UI driven hints Show stuff on screen so people have less guessing to do UX Like UI but with an X Working Group's 💜 Imagined, curated and loved by the Working Group Search and Discovery Mess around and find out Drupal Views Ask and you should receive Search API labels Jan 19, 2024
@DiegoPino DiegoPino added Sub Modules When you need more .info.yml files to keep life organized Drupal 10 Upgrade economy labels Jan 19, 2024
@alliomeria
Copy link
Contributor

This is great @DiegoPino! So far all testing in local has been going very well, no issues using either modern/regular modality for the interactions or with the 'classic' mode setup.

Next week, will work with you to pass some potential default configurations (views, facets, etc) to pair with these for standard deployments.

Thank you and have a great weekend! :D

@DiegoPino
Copy link
Member Author

@alliomeria thanks so much for all the extensive testing. Same for you, happy weekend 🐶 🌷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Drupal Views Ask and you should receive Drupal 10 Upgrade economy enhancement New feature or request Javascript Favourite language of a PHP developer Search and Discovery Mess around and find out Search API Sub Modules When you need more .info.yml files to keep life organized UI driven hints Show stuff on screen so people have less guessing to do UX Like UI but with an X Working Group's 💜 Imagined, curated and loved by the Working Group

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Advanced Search: "classic" mode.

3 participants