Project

General

Profile

Bug #27195

Plugin stylesheet bundles contain styles from core

Added by Ondřej Pražák over 3 years ago. Updated about 3 years ago.

Status:
Ready For Testing
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

When inspecting plugin stylesheet bundles in production, they contain styles from core even though plugin does not use them and does not import them.

Steps to reproduce:
1) Go to page that uses plugin stylesheets from webpack (Hosts -> New with foreman_ansible plugin, Monitor -> Tasks)
2) Inspect the source of the css bundle

In development, the styles are pulled in as well, but it is more difficult to see as developer tools will point directly to the file from core.

foreman-tasks-bundle.png View foreman-tasks-bundle.png 227 KB Ondřej Pražák, 07/01/2019 01:30 PM
foreman-ansible-bundle.png View foreman-ansible-bundle.png 269 KB Ondřej Pražák, 07/01/2019 01:30 PM
production-pointing-to-bundle.png View production-pointing-to-bundle.png 300 KB Ondřej Pražák, 07/01/2019 01:38 PM
development-pointing-to-file-in-core.png View development-pointing-to-file-in-core.png 268 KB Ondřej Pražák, 07/01/2019 01:38 PM
Webpack-Bundle-Analyzer.png View Webpack-Bundle-Analyzer.png 433 KB webpack analyze results Avi Sharvit, 07/02/2019 07:21 AM
Foreman tasks bundle Foreman ansible bundle Production pointing to bundle Development pointing to file in core Webpack bundle analyzer

Related issues

Related to Foreman - Refactor #27172: Do not use !important in layout stylesheetsClosed
Related to Foreman - Bug #33153: Slot registry isn't singleton Closed

History

#1 Updated by Ondřej Pražák over 3 years ago

  • Related to Refactor #27172: Do not use !important in layout stylesheets added

#2 Updated by Avi Sharvit over 3 years ago

Same is true for `js` bundles.
A copy of the core javascript gets copied into each plugin js bundle.
  • Only happen if the plugins use the `componentRegistrt`

#3 Updated by The Foreman Bot about 3 years ago

  • Assignee set to Avi Sharvit
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7233 added

#4 Updated by The Foreman Bot about 3 years ago

  • Pull request https://github.com/theforeman/foreman/pull/7320 added

#5 Updated by Amir Fefer over 1 year ago

  • Related to Bug #33153: Slot registry isn't singleton added

Also available in: Atom PDF