Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature : Intergration Article draggable menu #25

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

LeoHugues
Copy link
Contributor

A way to integrate Draggable setting menu without overrinding article.html.twig

@bobdenotter
Copy link
Member

Hi, @LeoHugues, could you give an example how to use this feature?
We can perhaps put that in the default configurationyaml, so people can see how they can use it.

@LeoHugues
Copy link
Contributor Author

Hi @bobdenotter, I think that it's probaly not the best way to implement draggable settings. The config/extensions/bolt-article.yaml file is too long because of these two parameters (draggable: and draggable_menu:). Maybe we should put theme into Twig files and allow users to override templates and css extentions to customise editor ?

I have some styles conflicts with the assets/article/arx-content.min.css and I have to remove it. Moreover, I would very much like to put css to customise draggable_menu.

I am trying to find a way to integrate this feature but I have difficulty with the article extension mechanics at the moment.

What do you think of it ?

@bobdenotter
Copy link
Member

@LeoHugues I'm not too sure what the correct way could be.. Perhaps we could make it so, that you can override the templates.

In https://github.com/bolt/article/blob/master/src/ArticleInjectorWidget.php#L17

it says:

protected $template = '@article/injector.html.twig';

Maybe we could make it so that it would either use that, or a template configured in the config, so that somebody can overwrite it. 🤔

@I-Valchev
Copy link
Member

@bobdenotter @LeoHugues it's probably already possible to overwrite it, by creating a decorator service which simply extends the ArticleInjectorWidget?

Unless I'm misunderstanding this, and it needs to be part of the default article, of course.

@LeoHugues
Copy link
Contributor Author

LeoHugues commented Mar 17, 2021

@bobdenotter @I-Valchev how do you think of it ?

   draggable_menu: 
     template: '@draggable/_draggable_menu.twig'
     css: 'assets/article/css/draggable-menu-default.css'
     js: 'assets/article/js/draggable-menu.js'
  
   draggable:
     'card-01':        '@draggable/components/card/_card_01.twig'
     'card-02':        '@draggable/components/card/_card_02.twig'
     'paragraph':      '@draggable/components/general/_paragraph.twig'
     'text':           '<div class="text-arx">Lorem ipsum dolor si amet</div>'

@LeoHugues LeoHugues changed the title Update article template Feature : Intergration Article draggable menu Mar 17, 2021
@LeoHugues
Copy link
Contributor Author

@bobdenotter @I-Valchev how do you think of it ?

   draggable_menu: 
     template: '@draggable/_draggable_menu.twig'
     css: 'assets/article/css/draggable-menu-default.css'
     js: 'assets/article/js/draggable-menu.js'
  
   draggable:
     'card-01':        '@draggable/components/card/_card_01.twig'
     'card-02':        '@draggable/components/card/_card_02.twig'
     'paragraph':      '@draggable/components/general/_paragraph.twig'
     'text':           '<div class="text-arx">Lorem ipsum dolor si amet</div>'

@LeoHugues LeoHugues closed this Mar 18, 2021
@LeoHugues LeoHugues reopened this Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants