-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add disable parameter to keyboard widget #8223
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Can you explain why this is necessary, as opposed to just not using the keyboard-driven-input macro in the UI that the plugin implements? |
The "keyboard-driven-input" macro also implements the CTRL-ALT-left and CTRL-ALT-right shortcuts to navigate between the tabs. This functionality should still work. If the filter-input is a text area, the up and down keys are needed to navigate inside the text area, so they need to be disabled within the keyboard-driven-input macro. |
Thanks @pmario I am tempted to suggest that we remove the CTRL-ALT-left and CTRL-ALT-right shortcuts from advanced search, and instead try to implement keyboard shortcuts in a general purpose way within the tabs macro. It certainly complicates the advanced search code a lot. |
@pmario please note that the previous and next tab behaviour is independent of the keyboard-driven-input(kdi) macro, so you can maintain that behaviour and not use the kdi macro. |
I think the disabled parameter for the keyboard widget is useful independent of the keyboard-driven-input macro. It can help to make macros more flexible, in the same way as it does work for the button-widget |
@pmario The genesis widget already offers a great deal of flexibility in terms of conditionally creating a keyboard widget. Can you think of a scenario where that is not sufficient or flexible enough? |
The genesis-widget is OK for advanced users to extend the functionality of core widgets, but users should not be forced to use it, to fix deficits of core widgets. |
I don't see any deficit here with the keyboard widget, and the genesis widget is precisely the tool that should be used when desiring flexibility as to which widget/element to create. This was one of the driving factors behind its creation. It is not meant just for overriding or tweaking core widgets. Furthermore disabling the keyboard widget in this manner is extremely awkward for a widget that usually has no visible user affordance and this has no precedence, neither in the core nor in HTML. |
This PR is related to PR: use a textarea in advanced-search-filter tab #8194 which should be implemented differently in wikitext.
To be able to implement #8194 functionality as a plugin the core needs to support a "disabled" parameter for the keyboard-widget, which this PR implements.
tc-disabled
class is assigned to the HTML element, so it can be used for styling if needed.