I see that some of the uPortal-contrib web components are including BootstrapVue “components” to add UI elements like dropdown menus. Unfortunately, adding even a single component from BootstrapVue drastically increases the size of the final Javascript file for your component. For example, when I run “npm run build” on the notification-icon project, the minified Javascript file is over 200 KB. This warning from webpack about the component size appears:
warning
asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
notification-icon.js (486 KiB)
warning
entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
notification-icon (486 KiB)
notification-icon.js
warning
webpack performance recommendations:
You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
For more info visit https://webpack.js.org/guides/code-splitting/
If it’s the only component in your page that may be acceptable but as we build and add more components to uPortal, they impact performance and the user experience. I have experimented with BootstrapVue, Vuetify, and Vue Material and their A la carte system for importing just the component you want, but they all have the same component-bloat problem. These component frameworks are handy for building UI elements for single- or multi-page Vue applications where size isn’t an issue, and we use them for that purpose at our university, but I don’t think they are suitable for building web components intended for use in uPortal (or elsewhere).
For the same reason, I think we should divorce ourselves from jQuery and Bootstrap and write Vue components using as much of the native Vue functionality as possible and write the rest in plain old Javascript; well, ES6, ES2015, ECMAScript 2015, or whatever it’s called now. Including these libraries for one piece of functionality results in a massive amount of included code; 99% of which you don’t use. I know webpack does tree-shaking to reduce the amount of code but you still end up with large Javascript files as you can see above.
The best alternative I’ve found so far, short of building common UI elements myself—which I don’t want to do—is the Bulma CSS framework. It has all the standard UI elements we’re familiar with, like buttons, tabs, and dropdowns. It adds much less bloat to your final Javascript file because it’s essentially just CSS, separated into smaller SASS files so you include only what you need. In some cases there’s a little more work involved to wire up functionality when you click on things, but it’s not that hard. As an example, I added the Bulma dropdown to a project by importing the dropdown.sass file into my .vue file and it increased the final build by only 1.7K. Which is a lot less than 200K.
<style
lang="scss"
scoped>
@import
"~bulma/sass/utilities/_all.sass";
// required
@import "~bulma/sass/components/dropdown.sass";
</style>
If anyone is interested in using Bulma and would like some tips to get up to speed quickly, I’d be happy to explain. It’s pretty easy.
Lauren
const vue = async () => {
return import(
/* webpackChunkName: "dynamic-Vue" */
'vue'
).then((module) => module.default);
};
const jQuery= async () => {
return import(
/* webpackChunkName: "dynamic-jQuery" */
'jquery'
).then((module) => module.default);
};
export {
vue,
jQuery,
};
import {
jQuery,
vue,
} from 'DynamicImports';
const [jquery, vue] = await Promise.all([
jQuery(),
vue(),
]);
// This syntax was from last year, I believe you can import dynamic imports directly now at the top of the class.
Hi all,
I'm facing on the same problems ! So any feedback, solutions, and
contributions are welcome from now, but in a future it would be
great to have a common way.
Leigh, I like your solution, it would be usefull to provide
shared components/librairies. Lauren I already hear about the
Bulma framework, but didn't watched on, but it seems that it's
done on the ligth way ! and so could provide a good help to
developpers for UIs in an easy and ligth way with UI components.
After from my point of view, web-components should not includes
UI libraries as a web-component should be a really small UI
element, but that's not easy everywhere/all the time. Also I try
to avoid to use UI libraries as it's easy to reproduce elements in
css and sometimes with few js only. My way is to avoid to import
fat things for a small need/use, and in most case I gain some
times to do manually the things (many peoples add bootstrap for
only the "grid" or the dropdown !). Also remember with uPortal
about some css framework that where used and how it's/it was
complicated to modify/update/remove them.
Also Material provide beautiful tools for UI but is really fat
and sometime complex to use it everywhere, so now with my
teammates we use Material "patterns" but made only with custom
css, it's easy to find the css of different elements and to apply
them !
Julien
--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uportal-dev...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/uportal-dev/.
Thank you, Christian for the explanation. Why is anyone still trying to support IE? At 2.6% usage, even Microsoft is dropping support. How about a simple message that says “This application will not run properly in this ancient and decrepit browser. Please try one of these other popular, modern browsers:” and provide links to install Chrome, Firefox, Safari, etc. Kill the beast!
Lauren

I see that some of the uPortal-contrib web components are including BootstrapVue “components” to add UI elements likedropdown menus. Unfortunately, adding even a single component from BootstrapVue drastically increases the size of the final Javascript file for your component. For example, when I run “npm run build” on the notification-icon project, the minified Javascript file is over 200 KB. This warning from webpack about the component size appears:
warningasset size limit: The following asset(s) exceed the recommended size limit (244 KiB).This can impact web performance.Assets:notification-icon.js (486 KiB)warningentrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.Entrypoints:notification-icon (486 KiB)notification-icon.jswarningwebpack performance recommendations:You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.For more info visit https://webpack.js.org/guides/code-splitting/
If it’s the only component in your page that may be acceptable but as we build and add more components to uPortal, they impact performance and the user experience. I have experimented with BootstrapVue, Vuetify, and Vue Material and theirA la carte system for importing just the component you want, but they all have the same component-bloat problem. These component frameworks are handy for building UI elements for single- or multi-page Vue applications where size isn’t an issue, and we use them for that purpose at our university, but I don’t think they are suitable for building web components intended for use in uPortal (or elsewhere).
For the same reason, I think we should divorce ourselves from jQuery and Bootstrap and write Vue components using as much of the native Vue functionality as possible and write the rest in plain old Javascript; well, ES6, ES2015, ECMAScript 2015, or whatever it’s called now. Including these libraries for one piece of functionality results in a massive amount of included code; 99% of which you don’t use. I know webpack does tree-shaking to reduce the amount of code but you still end up with large Javascript files as you can see above.
The best alternative I’ve found so far, short of building common UI elements myself—which I don’t want to do—is theBulma CSS framework. It has all the standard UI elements we’re familiar with, like buttons, tabs, and dropdowns. It adds much less bloat to your final Javascript file because it’s essentially just CSS, separated into smaller SASS files so you include only what you need. In some cases there’s a little more work involved to wire up functionality when you click on things, but it’s not that hard. As an example, I added the Bulma dropdown to a project by importing the dropdown.sass file into my .vue file and it increased the final build by only 1.7K. Which is a lot less than 200K.
<style lang="scss" scoped>
@import "~bulma/sass/utilities/_all.sass"; // required
@import "~bulma/sass/components/dropdown.sass";
</style>If anyone is interested in using Bulma and would like some tips to get up to speed quickly, I’d be happy to explain. It’s pretty easy.Lauren
--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uportal-dev...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/uportal-dev/.
--
Julien Gribonvald
--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uportal-dev...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/uportal-dev/.
--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uportal-dev...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/uportal-dev/.
On my side (from France) we should not eliminate
supported/upgraded browsers to avoid to exclude peoples without
good computer acknowledge ! That's an accessibility rule if I'm
not wrong.
After in middle and high schools we have more peoples with lower
computer acknowledge than in universities. So we kept at least a
compatibility for IE 11 but after some month we have now only 0,3%
of use with this browser and 2,6 % with Edge. The main part use
google chrome or safari (~40% each), and the remaining part use
mainly firefox (7,3%).
Also we provide a message that tell to users to download and install a supported browser with the links to official documentations. After Christian Murphy already made a PR that purpose a such solution see here : https://github.com/Jasig/uPortal-start/pull/264, the problem with this solution is it use an external website...
@Christian Murphy: thanks for your explanations but there is a point of view that is really important for me, we should keep a really small bundle size for mobiles, now our users use mainly a mobile (71% of mobiles, 2% of tablet, and 26% of desktop) and from everywhere so we should optimize the download size. Also that's why we should go more on progressive web apps !
Julien
Just echo'ing that sentiment. HAXcms will treat IE11 as effectively having no javascript. We're treating Edge (of today) w/ a watered down version of what we give people. I dug into the data as part of a recent talk if looking for additional data to back this opinion -- https://youtu.be/Akn6keIYZ3k?t=823
To unsubscribe from this group and stop receiving emails from it, send an email to uport...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/uportal-dev/.
--
Julien Gribonvald
--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uport...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/uportal-dev/.
--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uport...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/uportal-dev/.
--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uportal-dev...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/uportal-dev/.
To unsubscribe from this group and stop receiving emails from it, send an email to uport...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/uportal-dev/.
--
Julien Gribonvald
--
You received this message because you are subscribed to the Google Groups "uPortal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uport...@apereo.org.
To unsubscribe from this group and stop receiving emails from it, send an email to uportal-dev...@apereo.org.
To unsubscribe from this group and stop receiving emails from it, send an email to uportal-dev...@apereo.org.