Learn more about these different git repos.
Other Git URLs
While xstatic-patternfly-common is pretty cool package, it makes my life slightly more difficult as a developer. I run copr-frontend directly from sources without building and installing it every time I make a change. Currently it leads to this:
xstatic-patternfly-common
<img alt="Screenshot_from_2018-02-22_10-57-03.png" src="/copr/copr/issue/raw/0d67df341ad1c44c5e64ddcc876f18af52f13c0547ee52decb159a8929106e78-Screenshot_from_2018-02-22_10-57-03.png" />
We already bundle lots of stuff in the application so I wouldn't worry that much about bundling at least patternfly.min.js and patternfly.min.css in addition. Do we need anything else from xstatic-patternfly-common? If we need some images or icons, then we can use it the approach of copying just those into copr-frontend application during build-time. If not, I think we can stop using xstatic-patternfly-common.
patternfly.min.js
patternfly.min.css
By the way, we definitely do not need: Requires: xstatic-patternfly-common.
Requires: xstatic-patternfly-common
Alternative screenshot link: http://clime.cz/screenshot.png
Btw. I tried to workaround my issue by setting up symbolic links from /usr/share/javascript/patternfly to ~/copr/frontend/coprs_frontend/coprs/static/. But the problem is that e.g. ~/copr/frontend/coprs_frontend/coprs/static/js directory already exists in our codebase so I would need to make this workaround much more complicated. If we need it, I would really opt xstatic-patternfly-common only for images or png icons.
~/copr/frontend/coprs_frontend/coprs/static/js
In addition to patternfly.min.js and patternfly.min.css, we need patternfly-additions.min.css for graphs.
patternfly-additions.min.css
Okay, I would suggest including those three files directly in the application sources and dropping xstatic-patternfly-common. It's around ~350KB of data, which is a lot but given that our components dir currently has:
8.6M components
I would go for it anyway.
I want to investigate this, so please give me at least some before bundling it.
We already bundle lots of stuff in the application so I wouldn't worry that much about bundling
So because we are already bundling we should stop caring about bundling? :(
By the way, we definitely do not need: Requires: xstatic-patternfly-common
Fonts including glyphicons. *.less files, spinners.
Because....?
We already bundle lots of stuff in the application so I wouldn't worry that much about bundling So because we are already bundling we should stop caring about bundling? :(
Do you have a better solution? This is not just a case for me but for anyone who would want to run copr-frontend e.g. in virtualenv. If you have a better solution then I am all for it.
By the way, we definitely do not need: Requires: xstatic-patternfly-common Fonts including glyphicons. *.less files, spinners. Because....?
Fonts including glyphicons. *.less files, spinners. Because....?
No idea what you mean here.
I'm wholeheartedly against any bundling. I'm not sure I understand the issue in description though.. why the symlinks doesn't work?
I was curious how the selinux works when we have Requires: xstatic-patternfly-common and we actually not using that package at all since there's: cp -a %{_datadir}/javascript/patternfly %{buildroot}%{_datadir}/copr/coprs_frontend/coprs/static/components/
cp -a %{_datadir}/javascript/patternfly %{buildroot}%{_datadir}/copr/coprs_frontend/coprs/static/components/
in spec file. So we are actually bundling. Would it be possible to propose some fix for xstatic-patternfly-common so we wouldn't have to bundle?
What if we have a condition in our templates (or use macro containing such condition)
{% if config.DEBUG %} Render links to some online files {% else %} Render links to files provided by xstatic packages {% endif %}
Fixed by https://pagure.io/copr/copr/c/00b60736012d9d5ea7b75a958e05fcaca6f41ab5?branch=master.
Metadata Update from @clime: - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.