-
Notifications
You must be signed in to change notification settings - Fork 10
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-326: Advanced search community needs #327
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So much code for such a simple thing @alliomeria . Stuff is: Browsers will always pick the first submit found, so rendering order leads. If i put search first then other stuff like adding a + button by each one will still fail (future needs). Also Drupal will make all buttons input type=submit (if we want to pass stuff via form state) so i have to alter the form, intercept the Enter and trigger the only and only one (staring at the moon) button i care for (i care of other things, like plants and people)
DiegoPino
added
enhancement
New feature or request
Javascript
Favourite language of a PHP developer
Release duties
UX
Like UI but with an X
Search and Discovery
Mess around and find out
Drupal Views
Ask and you should receive
Search API
Sub Modules
When you need more .info.yml files to keep life organized
labels
Jun 21, 2023
But the past is past?
Still a debug statement here. Now the hard part. How to submit without querying? Or said differently, (bc i can) how to submit without querying new fields, if previously the user pressed "search", add one/delete one should not "delete the results" neither... i hate this
I mean, almost. The issue is i can not not submit the value so what happens is basically the facet summary for queries gets offset (uses the submitted value)... gosh... I will try with a pure JS option now but want to keep this around in case i need to rollback
This will eventually in the future allow what users want... 80's Advanced Searches. Gets around Drupal's Core bug that does not allow #ajax actions to work on exposed form filters bc the Filter logic removes the $form_id needed for the caching system to work (throwing an invisible error so weird... like max file upload reached? c'mon drupal)
What is not YET working? The View is caching old Submit values. Means when i delete one and re-add one, the old "search" term reappears ... as a default. Who knows why? I will never know why. But i basically need to intervene either here or in the Ajax Controller to avoid non-accepted/not-parsed values to be take by the Filter as valid/kept around...
@alliomeria i did it. 2AM. Done for the day!
Just the minimal, each theme can override this
🚀 🌟 Woohoo! So many great advanced search toolings @DiegoPino! 🧰 🤓 |
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
enhancement
New feature or request
Javascript
Favourite language of a PHP developer
Release duties
Search and Discovery
Mess around and find out
Search API
Sub Modules
When you need more .info.yml files to keep life organized
UX
Like UI but with an X
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #326
First one:
Submit on enter (not add one/remove one on Enter)
So much code for such a simple thing @alliomeria . Stuff is: Browsers will always pick the first submit found, so rendering order leads. If i put search first then other stuff like adding a + button by each one will still fail (future needs). Also Drupal will make all buttons input type=submit (if we want to pass stuff via form state) so i have to alter the form, intercept the Enter and trigger the only and only one (staring at the moon) button i care for (i care of other things, like plants and some people and trees and moonshine)
Second: no more stuck keywords on remove one, add one. I changed the whole logic, drupal is so buggy. Now Add more/remove one act on pure JS, change values and then autosubmit (via drupal). Which in theory means in the near future I can have add more/remove without any submits at all.. (not today). Also no more ghost "previous" values appearing
Third: Fields to be searched can have their Labels rewritten (don't like Rendered HTML? you can name them
Pikachu field
and doneFourth: You can define a min of initial fields. Don't like a single one? Start with 2!
Need to show you this so you can find more bugs tomorrow, but I feel release is ready to roll if all goes well/passes your checks