Closed (fixed)
Project:
Tour
Version:
2.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
26 Sep 2025 at 09:18 UTC
Updated:
16 Oct 2025 at 12:19 UTC
Jump to comment: Most recent
The "TipPluginText" Tip plugin has several "base" form elements which should be part of the "TipPluginBase". See https://git.drupalcode.org/project/tour/-/blob/2.0.x/src/Plugin/tour/tip...
Move "label", "id", "plugin", "weight", "selector" and "position" form elements to TipPluginBase.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
grevil commented@smustgrave, if you agree, I can fire up a quick MR.
Comment #3
grevil commentedThis is also reflected in the already existing schema:
Comment #4
anybodyThanks @grevil yes totally makes sense architecturally, also to allow clean, unified plugins in contrib without reinventing the wheel or copying common code.
I think it just wasn't needed in the past, because there is only one plugin. But clear to see these things are very general :)
Comment #5
smustgrave commentedIf you can do it and doesn't break anything go for it.
Comment #6
grevil commentedDone! Please review!
Comment #8
anybodyThanks @grevil! I'm 50/50...
I'm 100% sure that ID, title, etc. should go into the base class!
I'm a bit (50/50) unsure about:
because they might be required for 90% of all Tip Plugins and 95% of all "content" Tip Plugins.
Your point with the schema on the other hand is totally valid, looking at that, I'd definitely vote to unify all into the Base.
An alternative would be to put those three into a trait, sth. like
src/TipPluginContentTrait.phpbut for the schema that would still mean, that these three should be moved out of the general tip and into tour.tip.text.What do you think @smustgrave?
I might tend to over-optimization here...?
Comment #9
smustgrave commentedMaybe we should follow what the schema has where body is attached to the text plugin. Thinking if plugins get created for images or something other then text.
Comment #10
grevil commentedThe MR should have reflected that already, but it didn't. Now it should be correct.
Comment #12
smustgrave commentedThanks LGTM!
Comment #14
grevil commentedThank you, @smustgrave! :)
Could you tag a new release? Would appreciate it!
Comment #15
smustgrave commentedWaiting on 1 more ticket but should this week