Comments (6)
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.
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.
Thank you for the clarification, it's ok for me!
from micro-lc.
It's ok for me!
Great job @ilteoood
from micro-lc.
It's ok for me too! Nice feature!
from micro-lc.
Feature implemented in version 2
from micro-lc.
Related Issues (17)
- Hide menu option HOT 1
- Documentation improvement HOT 1
- Side menu hides last last plugin on long list HOT 2
- Support SEO
- Configurable menu on click on user avatar in header HOT 1
- Add options to inject external sytlesheet into plugins HOT 2
- Opening drawer causes page to be moved up
- microlc randomly fails while constructing the url and adds app_dataentry
- [Bug] Wrong response content-type getting the micro-lc-base.js file HOT 1
- Router matches urls not in configuration
- micro-lc loading with an heavy bundle
- Microlc "development" version 2.0.3 cannot import qiankun module
- qiankun-head base url
- Unexpected behaviour when routing HOT 1
- 2 simplest projects Vue3 Typescript Vite integration HOT 17
- Separate CDN publish job
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micro-lc.