- Issue created by @Anybody
- 🇩🇪Germany Anybody Porta Westfalica
Before implementing this, do the maintainers agree this makes sense and would be merged?
- 🇮🇱Israel jsacksick
Greenlight to work on this, we can probably just call the attribute "description", don't think there is a need to prefix description by admin_.
- 🇩🇪Germany Anybody Porta Westfalica
Thank you @jsacksick cool! :)
The admin_prefix idea comes from block plugins in core: https://www.drupal.org/docs/creating-modules/creating-custom-blocks/crea... →
They have a
label
andadmin_label
for different goals and I thought the target audience for this description is the admin area, not the end-user UI checkout UI, as it explains, what the pane is used for (for site builders / admins). Perhaps this is clearer now?But we'll do it as you'd like it to be as maintainer. Just wanted to explain it more clearly.
- 🇮🇱Israel jsacksick
Ok, I'm convinced, let's stick with "admin_description" then.
- 🇩🇪Germany Anybody Porta Westfalica
Thanks, I'll put this on our roadmap! :)
- 🇩🇪Germany Anybody Porta Westfalica
Just came across a case where an optional
admin_label
would also make sense to set a different admin UI label from the user-facing label in ✨ Drupal 8+ version ActiveShould work similar to how Core blocks do it.
- 🇮🇱Israel jsacksick
@anybody: hm... Hm... Technically this is why we have a "display_label". When set, it is going to be used on the frontend and the label is only going to be used in the admin.
So I guess we have support for that already in a way. - 🇩🇪Germany Anybody Porta Westfalica
@jsacksick thanks, sorry I didn't see that. So it's different from core blocks logic then. Thank you!
- First commit to issue fork.
- Assigned to lrwebks
- Status changed to Needs work
4 months ago 10:58am 4 September 2024 - 🇮🇱Israel jsacksick
I don't think the configuration summary is the right place for this... Probably makes more sense to display that under the label (assuming that is possible).
The configuration summary shows a summary of the actual configuration... This isn't related to configuration, but is more of a help text for admins? - 🇩🇪Germany Anybody Porta Westfalica
@jsacksick yeah that's right. Placing it there was a first attempt to see if placing it on the right side is better or below the label... @lrwebks could you post a screenshot of the current situation please?
- Status changed to Needs review
4 months ago 12:59pm 4 September 2024 - 🇩🇪Germany lrwebks Porta Westfalica
If the pipeline is green, my work is done here! The description definitely works. Do you want me to go over already existing Pane types within the base Commerce and add descriptions to them now?
- 🇩🇪Germany lrwebks Porta Westfalica
I suppose that I should also implement some tests for the admin description, so I'll be working on those now. Feel free to already take a look at what's been done!
- Status changed to Needs work
4 months ago 2:00pm 4 September 2024 - 🇩🇪Germany lrwebks Porta Westfalica
Here's a screenshot of the current look within the Checkout Flows configuration:
I'm currently working on the fix that @Anybody pointed out, as well as implementing the proper tests.
- 🇩🇪Germany lrwebks Porta Westfalica
The pipeline fails, but the failure actually seems unrelated, as I cannot draw any connection between the code that I changed and the failing test. Additionally, the pipeline was green for the commit that I made before the latest one, yet when I revert my changes locally back to the commit that passed PHPUnit, the failure persists. @Anybody, would you mind taking a look, testing it locally, or sharing any possible ideas?
I am continuing now to open a second MR, in which I place the admin description below the Pane title in the UI, so that we can later decide on which of the two UI approaches is more suitable to be merged.
- 🇩🇪Germany Anybody Porta Westfalica
@lrwebks I left some comment. I thought we talked about a separate MR for the different approach ...
Please provide a screenshot of the final result after the changes.
- Status changed to Needs review
3 months ago 9:00am 12 September 2024 - 🇩🇪Germany lrwebks Porta Westfalica
Due to the fact that the pane configuration list is a table, @Anybody and I currently found it to only be possible to move the description below the label via the
'#suffix'
key. Improvement ideas for this approach are appreciated! Back to review! - 🇩🇪Germany lrwebks Porta Westfalica
Here's the look with the admin description above the configuration summary:
And here's the description below the pane label (personal favorite):
Note that I am working on a pretty similar issue ( ✨ Display 'default_step' property of @CommerceCheckoutPane plugins in administration Needs work ) where I put a label denoting the
default_step
property below the pane label, so if both issues are merged, there will be two lines of information (admin_description
,default_step
) below the pane label. - Status changed to Needs work
3 months ago 9:11am 12 September 2024 - 🇩🇪Germany Anybody Porta Westfalica
Thanks @lrwebks, indeed I also don't see a good other way to place it there. Maybe @jsacksick has other ideas or final comments.
I left some final clean-up comments, afterwards I think we should set this RTBC for maintainer feedback. Great and nice learnings for you here :)
- Status changed to Needs review
3 months ago 9:31am 12 September 2024 - Issue was unassigned.
- Status changed to RTBC
3 months ago 9:33am 12 September 2024 - 🇩🇪Germany Anybody Porta Westfalica
GREAT! I like it (see #25, MR!333)
RTBC from my side, let's wait for Maintainer feedback!