- Issue created by @pdureau
- 🇫🇷France pdureau Paris
A first proposal...
We can mimic the Drupal/link/Plugin/Field/FieldType/LinkItem structure:
blockquote: label: "Blockquote" description: "For quoting blocks of content from another source within your document. links: - uri: https://getbootstrap.com/docs/4.6/content/typography/#blockquotes title: Documentation options: {} fields: {}
Only "uri" is mandatory, so this would work too:
blockquote: label: "Blockquote" description: "For quoting blocks of content from another source within your document. links: - uri: https://getbootstrap.com/docs/4.6/content/typography/#blockquotes fields: {}
- 🇫🇷France duaelfr Montpellier, France
I'd say that if we start thinking about links we might want to think about more markup.
Could we support something like markdown in this field? It could be really useful for themes implementing full Design Systems.
Did you look at what's planned for SDC? It could give us some ideas too. - Issue was unassigned.
- 🇫🇷France pdureau Paris
Markdown could also be a good idea.
But those 2 proposals are not exclusive. We can add links in this ticket and do Markdown in an other ticket.
About the structure, can we have a dual notation?
Complex:
blockquote: label: "Blockquote" description: "For quoting blocks of content from another source within your document. links: - uri: https://getbootstrap.com/docs/4.6/content/typography/#blockquotes fields: {}
Simple:
blockquote: label: "Blockquote" description: "For quoting blocks of content from another source within your document. links: - https://getbootstrap.com/docs/4.6/content/typography/#blockquotes fields: {}
Like we already have for components variants or styles options
- 🇫🇷France Grimreaper France 🇫🇷
Hi,
For the complex one, you want in case something like:
links: - uri: https://getbootstrap.com/docs/4.6/content/typography/#blockquotes label: 'My link' attributes: target: _blank
?
- 🇫🇷France pdureau Paris
Is it an existing structure in Drupal? We can get any data structure for links if already existing. Let's not invent a new one.
- 🇫🇷France Grimreaper France 🇫🇷
I agree to not invent new ones.
In this case why proposing a complex and a simple syntax? Let's stick to the simple one?
- 🇫🇷France Grimreaper France 🇫🇷
After discussion with @pdureau.
The following syntax should be supported:
... links: - url: https://getbootstrap.com/docs/4.6/content/typography/#blockquotes title: Documentation - https://getbootstrap.com/docs/4.6/content/typography/#blockquotes
In the plugin definition classes (for Patterns, Styles, Examples), handle the links:
- if it is the simple structure, convert it into the complex one, putting 'External documentation' as default title
- convert the complex structure into renderable element:
- add '#' in front of keys, so it follows the Link render element structure. That way if people wants to use options or attributes, it can.
- convert url key value into an URL object (maybe with URL::fromUserInput())Warning: link title should be translatable, I think it is in the plugin manager that this kind of info can be added.
Update the library Twig templates to use the new links.So need to create the corresponding issues in ui_patterns, ui_styles, ui_examples (, ui_skins?) and also in ui_suite_bootstrap (and the other ui_suite themes) to have direct usage to test the feature.
- Status changed to Needs work
over 1 year ago 4:02pm 14 September 2023 - 🇫🇷France Grimreaper France 🇫🇷
(Could I get "maintain issues" permission to be able to assign issues please?)
Done in:
- UI Patterns 1
- UI Styles
- UI ExamplesShould it be done in UI Skins?
- 🇫🇷France Grimreaper France 🇫🇷
MR for UI Suite Material ready.
No reply to my last comment. I think after merge in UI Suite Material, this issue can be marked as fixed.
- Status changed to Fixed
10 months ago 6:20pm 3 June 2024 Automatically closed - issue fixed for 2 weeks with no activity.