----- Original Message ----- > From: "Andres Galante" <[email protected]> > To: "Vojtech Szocs" <[email protected]> > Cc: "Patrick Riley" <[email protected]>, "patternfly" > <[email protected]>, "Oved Ourfali" <[email protected]> > Sent: Monday, August 29, 2016 2:02:17 PM > Subject: Re: [Patternfly] Technical questions and ideas > > Hi Vojtech, > > Sorry for keep you waiting, this email got lost during my PTO. > > I couldn't agree more, PatternFly CSS needs to be modular and easier to > consume. > > I wanted start a discussion with the community about it when I have a > clearer idea of a path to move forward. But since you've mention it, if > there any though/solution you'd like to share?
Hi Andrés, I'm replying late again (was away for ~2 weeks, sorry). Looking at PatternFly's Gruntfile.js, I understand that the intention right now is to provide a self-contained bundle where 'dist' contains: - patternfly.css [contains styles for PF + Bootstrap + Font Awesome] - patternfly-additions.css [Bootstrap Datepicker etc. + PF overrides] - all fonts [Bootstrap fonts + Font Awesome + PF specific fonts] However, this self-contained approach is only limited to CSS + fonts since the dist/js/patternfly.js does not include jQuery etc. Since it's important not to break existing PatternFly users that rely on self-contained CSS + fonts, I'm suggesting the following approach: * support two build output types, 'bundled' and 'minimal' * 'bundled' == what you have today, but you should also ensure that patternfly.js contains 3rd party JS dependencies (e.g. jQuery) too, so that the self-contained approach applies consistently throughout all of your assets (JS/CSS/fonts) * 'minimal' == decoupling PF specific assets (JS/CSS/fonts) from 3rd party dependencies, which gives developers more flexibility, should they decide to use custom Bootstrap etc. * existing dist structure should correspond to 'bundled' output type to ensure existing PatternFly clients are not affected * 'minimal' files should be placed at e.g. dist/minimal This allows existing clients use PatternFly and new clients opt-into using the 'minimal' assets for greater flexibility (if they need it). Both 'bundled' and 'minimal' approaches have pros/cons, eventually the users will need to decide which approach suits them the best. > > Thanks a lot, > > Andrés > > > > On Fri, Aug 26, 2016 at 4:18 PM, Vojtech Szocs <[email protected]> wrote: > > > Hi Patrick, > > > > sorry for my late response, I wasn't subscribed to PF mailing list :[ > > > > > I have opened a PR to address the issue with d3 and shrinkwrap here: > > > https://github.com/patternfly/patternfly/pull/412 > > > > Nice! This fix should be part of PatternFly 3.9.0 if I see correctly. > > > > > Regarding bootstrap-treeview, we had already removed bower in our > > upcoming changes to treeview later this month, but I have gone ahead and > > added another PR since you are having issues now: > > > https://github.com/patternfly/patternfly-bootstrap-treeview/pull/4 > > > > Thanks! This fix should be part of patternfly-bootstrap-treeview 1.0.1. > > > > But I think you'll also need to update: > > > > # still contains "patternfly-bootstrap-treeview" .. "version": "1.0.0" > > https://github.com/patternfly/patternfly/blob/master/npm-shrinkwrap.json > > > > to make sure it's effectively used by PatternFly. > > > > > The hope is to remove bower as a dependency and move to NPM, as well as > > update node (if you'll notice, we still build on node 0.10). > > > > Big +1 on that one. > > > > (in oVirt Dashboard, we're using the latest LTS of Node which is v4) > > > > > I am not sure regarding your question about Patternfly css - you may > > want to discuss with Andres when he gets back. > > > > That would be great. > > > > Thanks again for stepping up and fixing those issues, much appreciated! > > > > Regards, > > Vojtech > > > > > > ----- Original Message ----- > > > From: "Vojtech Szocs" <[email protected]> > > > To: "patternfly" <[email protected]> > > > Cc: "Serena Doyle" <[email protected]>, "Oved Ourfali" < > > [email protected]>, "Greg Sheremeta" <[email protected]>, > > > "Ryan Barry" <[email protected]>, "Martin Betak" <[email protected]> > > > Sent: Thursday, August 11, 2016 9:13:11 PM > > > Subject: Technical questions and ideas > > > > > > Hello PatternFly team :-) > > > > > > Greg (CC'ed) and me are working on oVirt Dashboard UI and we have > > > some technical questions regarding PatternFly reference impl. [1] > > > > > > [1] https://github.com/patternfly/patternfly > > > > > > First of all, in our project, we'd like to lock down dependencies > > > via `npm shrinkwrap`. Let's say our package.json contains following > > > dependency: > > > > > > "patternfly": "~3.8.1" > > > > > > but when we run `npm shrinkwrap` it fails with an error: > > > > > > npm ERR! extraneous: [email protected] > > > /home/vszocs/work/releng-tools/specs/ovirt-engine- > > nodejs-modules/node_modules/patternfly/node_modules/d3 > > > > > > this is because PatternFly package.json [2] is inconsistent with > > > npm-shrinkwrap.json [3] - "d3" is not specified in package.json. > > > > > > [2] https://github.com/patternfly/patternfly/blob/v3.8.1/package.json > > > [3] https://github.com/patternfly/patternfly/blob/v3.8.1/npm- > > shrinkwrap.json > > > > > > Can you please fix this? Should I open ticket on GitHub or JIRA? > > > > > > Second, when running `npm install --no-optional` in our project > > > (using above mentioned PatternFly dependency), we're getting: > > > > > > sh: bower: command not found > > > npm WARN optional dep failed, continuing > > > [email protected] > > > > > > that's because patternfly-bootstrap-treeview does `bower install` > > > in its `install` script [4]. This basically assumes that Bower is > > > installed *prior* to executing `npm install`. > > > > > > [4] > > > https://github.com/patternfly/patternfly-bootstrap-treeview/ > > blob/v1.0.0/package.json#L27 > > > > > > Is there a way to fix that in patternfly-bootstrap-treeview? > > > > > > In today's world, where most projects just use `npm` to manage > > > all kinds of dependencies, Bower should not be a requirement > > > (or at least not for end users of PatternFly). > > > > > > Finally, I've seen Brian's e-mail on consolidating PatternFly > > > dependency management and I agree with the suggested approach: > > > use package.json to declare all of your dependencies and use > > > bower.json only for publishing/consuming PatternFly via Bower. > > > > > > One last thing - for now, PatternFly CSS includes CSS of all > > > its dependencies. While seemingly convenient, this generally > > > goes against the principle of multiple CSS processed & applied > > > one after another, with a natural consequence that you need to > > > instruct your JavaScript build tool to exclude CSS of Bootstrap, > > > C3 etc. [5] > > > > > > [5] https://github.com/patternfly/patternfly#using-wiredep > > > > > > Are there any plans to revisit this approach? > > > > > > My specs are: > > > > > > $ node -v > > > v4.4.6 > > > > > > $ npm -v > > > 2.15.5 > > > > > > Thanks in advance! > > > > > > Regards, > > > Vojtech > > > > > > > _______________________________________________ > > Patternfly mailing list > > [email protected] > > https://www.redhat.com/mailman/listinfo/patternfly > > > _______________________________________________ Patternfly mailing list [email protected] https://www.redhat.com/mailman/listinfo/patternfly
