- 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Hmm, why not add a checkbox under a accordeon box "Expert settings" that enables those options?
There are already other modules altering the list like Purge to actually add a good handful of the options added here.
- Status changed to Needs review
about 1 year ago 7:32am 28 September 2023 - 🇧🇪Belgium BramDriesen Belgium 🇧🇪
Also did a bit of cleanup:
- Code style
- There was a setting being set, but it was not present in the form, so I removed it
- Unused import removed - 🇳🇿New Zealand Josh Waihi
Thanks for the contributions @BramDriesen,
Hmm, why not add a checkbox under a accordeon box "Expert settings" that enables those options?
I am making an assumption here that if you're expert enough to fine tune cache control, you're also exporting config to code (e.g. with drush config:export). And as such, you could manipulate the settings in code there and bypass the form UI. But that does render the UI completely unhelpful so I am open to your suggestion to make the UI support an expert mode.
That mode should probably transform the field inputs from drop down options to integer fields where the expert can arbitrary set the TTL in seconds. Though presents might be still helpful for the expert, having presents only in the form of dropdowns would be too restrictive.
- Status changed to Needs work
about 1 year ago 6:52pm 1 October 2023 - 🇧🇪Belgium BramDriesen Belgium 🇧🇪
How about an additional checkbox for that conversion (in a separate issue)?
I am making an assumption here that if you're expert enough to fine tune cache control, you're also exporting config to code (e.g. with drush config:export). And as such, you could manipulate the settings in code there and bypass the form UI. But that does render the UI completely unhelpful
Correct, and it's that last part I'm worried about. Since e.g. if a developer leaves, a new person joins the team, or someone from the client that knows a bit about Drupal and caching and happens to look at the config screen, they will have questions. As the values are not shown/matching with what they see on the front-end.
- 🇳🇿New Zealand Josh Waihi
How about an additional checkbox for that conversion (in a separate issue)?
The ideal experience would be one where you could enable expert mode (e.g. toggle slider?) in the UI and without reloading the page, the form converts drop downs into integer inputs. That would likely require some form AJAX work so Drupal could rebuild the form with new input type for the form elements.
In lieu of that, a checkbox for export mode and a submission of the form to rebuild the form with integer inputs would work too.
I think we can do that in this issue and you can amend your current MR :)
- First commit to issue fork.
- Status changed to Needs review
11 months ago 3:28pm 16 January 2024 - 🇧🇪Belgium dieterholvoet Brussels
I added an AJAX-based expert mode that isn't stored it config, it just toggles the max-age inputs between dropdowns and number inputs.
-
dieterholvoet →
committed 81c91c48 on 8.x-2.x authored by
bramdriesen →
Issue #3173020 by dieterholvoet, bramdriesen, mmcconnell, josh waihi:...
-
dieterholvoet →
committed 81c91c48 on 8.x-2.x authored by
bramdriesen →
- Status changed to Fixed
16 days ago 11:13am 3 December 2024 Automatically closed - issue fixed for 2 weeks with no activity.