- Issue created by @AndyF
- Issue was unassigned.
- Status changed to Needs review
9 months ago 5:15pm 5 April 2024 - 🇬🇧United Kingdom AndyF
I appreciate this is a big ol' change, I feel I probably should've been a little more constrained in my changes. But on the plus side it has some tests (:
I was a bit surprised that I had to make the commit c26b46b8 to get the tests working on CI - I've asked about in Drupal Slack at https://drupal.slack.com/archives/C223PR743/p1712336082170709.
Although there is a
hook_update_N()
I haven't tested it (not even manually). I also haven't tested it with Drupal 9 yet.Some other possible todos I noticed while doing this (I'm being a bit lazy by not making individual issues, but just wanted to get them down, and they're not necessarily that important).
- Add a functional JS test that verifies links are shown/hidden on click, and that they show up on the correct side.
- Could we add a default icon in case there isn't one? Or alternatively just not show a link in the sticky tasks?
- When not using the block, we could provide a textarea for users to specify paths, similar to block visibility
- We could possibly recognize entity routes when trying to select an icon, eg.
entity.*.edit-form
. - Not my strength, but I think it's better to add classes than inline styling via JS, where possible.
- Also not my strength, but I was wondering if a transition would be a simpler way to achieve the animation than, er, an animation (:
Thanks!
- 🇬🇧United Kingdom AndyF
@fjgarlin got back to me and said the change to get the tests working is all as it should be.
- Status changed to Needs work
9 months ago 5:56pm 5 April 2024 - 🇬🇧United Kingdom AndyF
I've updated the tests to cover the previous major Drupal version, and this has uncovered at the very least I shouldn't be using autowiring or we should drop support for Drupal 9.
Andy, thanks a lot for well a whole rewrite and tests along with it, dropping support for D8/9 is just fine for sure.
To answer the followings:
- Could we add a default icon in case there isn't one? Or alternatively just not show a link in the sticky tasks?
- When not using the block, we could provide a textarea for users to specify paths, similar to block visibility
- We could possibly recognize entity routes when trying to select an icon, eg. entity.*.edit-form.
- Not my strength, but I think it's better to add classes than inline styling via JS, where possible.
- Also not my strength, but I was wondering if a transition would be a simpler way to achieve the animation than, er, an animation (:
- Yes we should, that we should for sure, happened on a website I've seen recently.
- Would be a nice addition
- isn't that what we are already doing? or what exactly you mean by recognize?
- The animations in general are not the best, it was the first draft that got stuck, yes we can/should make it more fancy.
have to check the code, but I thought I did use transition in the animation
- Status changed to Needs review
9 months ago 2:21pm 6 April 2024 - 🇬🇧United Kingdom AndyF
I've removed support for D9. Also added an optional test of the previous minor version (ie it has to be run manually), and ran that to confirm it works with D10.1.
Still haven't tested the update hook.
- 🇬🇧United Kingdom AndyF
We could possibly recognize entity routes when trying to select an icon, eg. entity.*.edit-form.
- isn't that what we are already doing? or what exactly you mean by recognize?
Yeah that wasn't very clear, and you're right, what we currently do is pretty much that. I noticed that we're dong substring matching eg. on
edit_form
but also onwebform.edit_form
, and I was wondering if we could match on a regex that detects an entity route as a whole, rather than a substring match. The only real advantage of this approach though is that you can then do a little bit of extra logic to determine if a canonical route is the edit form (eg. for a media entity). Ie if the route matches entity.*.canonical then check if the route also matches entity.*.edit_form, in which case it's an , otherwise assume it's a .Super minor tbh.
thanks Andy, yeah could be useful for future possible features as well, since you are the new maintainer, feel free to tag a 2.x
- Status changed to Fixed
8 months ago 1:50pm 13 April 2024 - 🇬🇧United Kingdom AndyF
I tested the update from 1.x to 2.x and it successfully converted the config from the old format to the new.
Automatically closed - issue fixed for 2 weeks with no activity.