Giter Club home page Giter Club logo

Comments (6)

davidebianchi avatar davidebianchi commented on June 15, 2024

Good works!

Just a few questions.

With this change, theme is per configuration and not per micro-lc instance. But could be useful to have a basic default theme across all plugins? Because I suppose that all the pages of an instance should share a theme, and repeat it in multiple configuration could not be the better approach (at least for variables and logos). What do you think?
We could share it through a theme api exposed by micro-lc backend?

Also for the analytics, it is not really a UI configuration. It is correct to move it in another plugin?

In the communication interfaces, the Custom Element should be a Custom Event (as the link), I suppose.
With the approach of the Custom Event, if the layout load after micro-lc the component could not load correctly if the event is fired before the render of the UI.
With the approach of the freezed object in window, if we have multiple instance of micro-lc the object should be namespaced in some way. The freezed object must be read only from the UI plugin, and not from the micro-lc instance. Correct?

from micro-lc.

ilteoood avatar ilteoood commented on June 15, 2024

Hi @davidebianchi,
with this proposal, the UI package will be the component who load micro-lc: so, the theming configuration is loaded once for each micro-lc instance. This means that the UI that you will provide around micro-lc will always be there to show the registered plugins and so the shared theme between plugins could not be necessary.

The API that will provide these configurations could be the general-purpose /api/v1/microlc/configuration/{configurationName}.

For the analytics part, is an open point. I supposed to be an UI-related part because we currently show a pop-up to accept the cookie, and the user could customize even this aspect.

I confirm that the proposal for the communication is based on Custom Event (sorry, my bad), but I don't agree about the loose of the initial event: as I wrote at the start of this answer, the UI will always be around micro-lc, so its duty is to also load the micro-lc web-component inside itself. In this way, micro-lc is bootstrapped always after the ui and you can always receive the event.

For the freezed object, I imagine that its content is read-only, but the reference of the object can be replaced without any problem, because it is not actively used by micro-lc.

from micro-lc.

davidebianchi avatar davidebianchi commented on June 15, 2024

Thank you for the clarification, it's ok for me!

from micro-lc.

akelity avatar akelity commented on June 15, 2024

It's ok for me!

Great job @ilteoood

from micro-lc.

eros-piccioni avatar eros-piccioni commented on June 15, 2024

It's ok for me too! Nice feature!

from micro-lc.

epessina avatar epessina commented on June 15, 2024

Feature implemented in version 2

from micro-lc.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.