#49694 Ticket 49689 - Move Cockpit UI plugin to a subpackage
Closed by spichugi. Opened by mreynolds.
mreynolds/389-ds-base ticket49689  into  master

Download 49694.patch

Description: Move the new UI plugin to a subpackage of 389-ds-base.
Special thanks to Viktor Ashirov for helping on this one!

https://pagure.io/389-ds-base/issue/49689

Reviewed by: ?

Making a few tweaks, rebase on the way...

rebased onto d477446ec73163ab6ab65ac5aadc74781ce97eb1

rebased onto 7420c46990852f9ed13c97defa57489a6a338288

I think we should not ship node_modules, since this is a build artifact and it overlaps with some resources shipped by cockpit-bridge (like minified versions of jquery, patternfly, web fonts, etc). But that would also required a fix in index.html.
And with this PR 389-ds app fails to render for me in the cockpit UI because of multiple load errors.

I think we should not ship node_modules, since this is a build artifact and it overlaps with some resources shipped by cockpit-bridge (like minified versions of jquery, patternfly, web fonts, etc). But that would also required a fix in index.html.

I'm not sure this work, but I will give it try. I ran into a lot of problems when I used cockpits PF and JQ and I was for forced to use my own, but we'll see....

And with this PR 389-ds app fails to render for me in the cockpit UI because of multiple load errors.

Hmm, okay...

rebased onto 213f3c47a9780821df93b14fd8a291452a2c3b4a

I was able to remove node_modules and bring over exactly what I needed. Since I am using my own patternfly file I had to bring in a subset of fonts (389-console/fonts), but its very minimal.

As for the rendering issue, make was ignoring the "dist" directories under node_modules for some reason, but the change above resolved that as well.

Nice, now the app works for me and the package footprint is so much smaller!

About the fonts:
I see the following from cockpit packages:

/usr/share/cockpit/base1/fonts/fontawesome.woff -- from cockpit-bridge
/usr/share/cockpit/static/fonts/OpenSans-Bold-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-Light-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-ExtraBold-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-BoldItalic-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-Regular-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-SemiboldItalic-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-ExtraBoldItalic-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-Semibold-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-LightItalic-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-Italic-webfont.woff -- from cockpit-ws

Maybe we can reuse them?

Also, since it's a webapp, ttf files can be skipped. And woff2 files, even though they have better compression ratio, are not that well supported by all browsers: https://caniuse.com/#feat=woff vs. https://caniuse.com/#feat=woff2 Cockpit also doesn't ship them, so I think we can exclude them as well.

The rest looks good to me, you have my ack.

                                  Nice, now the app works for me and the package footprint is so much smaller!

About the fonts:
I see the following from cockpit packages:
/usr/share/cockpit/base1/fonts/fontawesome.woff -- from cockpit-bridge

/usr/share/cockpit/static/fonts/OpenSans-Bold-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-Light-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-ExtraBold-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-BoldItalic-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-Regular-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-SemiboldItalic-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-ExtraBoldItalic-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-Semibold-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-LightItalic-webfont.woff
/usr/share/cockpit/static/fonts/OpenSans-Italic-webfont.woff -- from cockpit-ws

I'm not sure how to point to font files. The font locations seem to be hardcoded in PF, but I was able to remove the ttf and woff2 files, now its a really small footprint.

Maybe we can reuse them?
Also, since it's a webapp, ttf files can be skipped. And woff2 files, even though they have better compression ratio, are not that well supported by all browsers: https://caniuse.com/#feat=woff vs. https://caniuse.com/#feat=woff2 Cockpit also doesn't ship them, so I think we can exclude them as well.
The rest looks good to me, you have my ack.

rebased onto 50b5449443f11bc7c32a445fc7cfd6d80eee430d

Pull-Request has been merged by mreynolds

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/2753

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

Metadata