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

ISSUE-404: Facet summary with separate entries per Input/field for advanced search #405

Merged
merged 24 commits into from
Jan 29, 2024

Conversation

DiegoPino
Copy link
Member

@DiegoPino DiegoPino commented Jan 22, 2024

See #404 . I will keep pulling this against 1.4.0 but maybe we can just make all 1.3.0 and then close the Restaurant, turn the tables and wash the dishes?

Who knows

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
…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
Also: double quotes (surrounding) will check if a double quote exist already in the search term and add <em> around them to differentiate.
@DiegoPino DiegoPino added enhancement New feature or request UI driven hints Show stuff on screen so people have less guessing to do Search and Discovery Mess around and find out Drupal Views Ask and you should receive Facets Safely navigating the too many choices Search API Drupal 10 Upgrade economy labels Jan 22, 2024
@DiegoPino DiegoPino added this to the 1.4.0 milestone Jan 22, 2024
@DiegoPino DiegoPino self-assigned this Jan 22, 2024
@DiegoPino DiegoPino marked this pull request as ready for review January 22, 2024 21:39
@DiegoPino
Copy link
Member Author

@alliomeria will do some testing now. Not sure yet if my logic works/makes sense. LOTs of array/moving things around, etc. If this works on my side I will ask you to test also during the week? Before the end of the week (bc I need to update a server during the weekend with this). Appreciate all your energies and efforts on this

Needs more testing @alliomeria but i can delete a single one, etc.
@DiegoPino
Copy link
Member Author

@alliomeria one issue I noticed - tomorrow but have to type now or I will forget- (which is not our processor I think?) is that if the facet block is set to OR (bad idea for advanced search) and we have 0 results, the current passed facet (e.g my own name) is not available to our processor (bc it is not part of the list) but also bc Drupal takes over the Facet summary (given than the facet block itself shows all the others to allow for an OR) it skips my logic and thus not showing the facet summary for the one that fails (my name, I fail)... hard to explain, will have to show tomorrow. Will double check the code if I can intercept/override this from the main Facet Summary. Seems like a bug to me

i delete the values i know i want to remove ... that way also other Filters in the URL + the count stay stable...
@alliomeria done (don't trust this). Will now test for 30 minutes or so trying to break all/the hell out of this and will report tomorrow in your afternoon. thanks
@alliomeria why? More testing tomorrow. This restores again the hot linking via GET of URLs that got lost in the most recent update to drupal 10.1 (the URL that auto updates + ajax via facet blocks/refresh which again after drupal 10.1 contained duplicated info (on GET and arguments) making the URLs after two Facet clicks wrong/unusable on the refreshed URL on the browser.
Also new in Drupal.Now any form adds the op to the submissions. So ugly
Now the show count respects also the global facet summary (per facet) selection. If disabled, we don't show it.
@DiegoPino DiegoPino merged commit 1ab346f into 1.4.0 Jan 29, 2024
@DiegoPino DiegoPino deleted the ISSUE-404 branch January 29, 2024 14:36
@DiegoPino DiegoPino restored the ISSUE-404 branch January 30, 2024 21:54
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 Facets Safely navigating the too many choices Search and Discovery Mess around and find out Search API UI driven hints Show stuff on screen so people have less guessing to do
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant