Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why so many repos about styles? #13

Open
GregTurner opened this issue Aug 8, 2017 · 40 comments
Open

Why so many repos about styles? #13

GregTurner opened this issue Aug 8, 2017 · 40 comments

Comments

@GregTurner
Copy link

I'm the author of yet another style repo, here.

I had to take a different direction than this repo, but I would like to unite our efforts. Could we incorporate the good from both or should we consciously allow both?

The good, and the reason for divergence, about this repo is mygovbc-bootstrap-theme:

  1. Integrated with npm/yarn for easy dependency management
  2. Uses 99% bootstrap, no custom classes to learn
  3. Has demo page to view all styles
  4. Comes pre-concatenated, uglified

Thoughts from the community please!

@loneil
Copy link

loneil commented Aug 8, 2017

I agree that a unified stylesheet could could be an asset in a lot of projects.
I've used (an early version of) the theme Greg is referencing above on an application at BC Registries and it was nice to just be using the vanilla bootstrap classes and have them styled appropriately without having to declare new classes or do overrides.
If changes need to be made to certain UI components then we could just tweak the LESS variable file(s) easily. We were processing the LESS files as part of our build, but if no larger changes are required then being able to just import the styles as a dependency is useful as well.

@foley-lynn
Copy link

Great to see these repo's popping up. Considering all the different stacks and build processes being used, I wonder if it might be better to have a library of reusable snippets to be used when customizing/overriding bootstrap? Or I suppose both could be useful side-by-side depending on the use case for the developer.

@GregTurner
Copy link
Author

@foley-lynn definitely we've found ourselves with a good problem because in the past we had nothing! Snippets if definitely another options is that what you'd prefer as a developer or justing throwing the idea out there?

@foley-lynn
Copy link

Mainly thinking aloud at this point. It ultimately comes down to what the majority of developers thinks will be the most useful. I don't have a new build in the pipeline at this point, but if we got behind one project, I'd be happy to contribute.

@juhewitt
Copy link
Collaborator

juhewitt commented Aug 9, 2017

Allo! Well, I'm with @foley-lynn's main point as well for the majority of developers. It comes down to developer preference. At the end of the day, I would imagine a bootstrap theme that could be included through bower/automated package manager and/or just downloaded and installed independent of the development environment, that would be the best... (IMO and experience working throughout all of the ministries).

I've only spent my recent time in WordPress Vagrant development (SAGE automated theme etc), so bower this and that.. but I'll say a quick bower git clone call would be nice... :P

I am concerned from a governance perspective, that we are going to end up with a bunch of styles that may or may not follow the Province's branding guidelines which for the time being yours truly has to keep a watchful eye on. That's really only my one fright.

@GregTurner
Copy link
Author

From @juhewitt and @foley-lynn input we can say we want package manager integration as well as a manual download for various developer use-cases.

What about the pure bootstrap theme vs custom classing, what do developers prefer?

@juhewitt
Copy link
Collaborator

And this is where I'm dated... Yarn. LOL. Go ahead. Make fun.

I'm looking to the community to answer your question @GregTurner. I would say pure Bootstrap theme in my experience....

@GregTurner
Copy link
Author

GregTurner commented Aug 14, 2017

I agree @juhewitt let's bring in some past consumers/contributors: @ateucher @Gavin-McLeod @rturgano @mark-a-wilson

@mark-a-wilson
Copy link
Contributor

mark-a-wilson commented Aug 14, 2017

Hi all, don't feel like I can be much help here ... I've only been a consumer, and the stuff about dependencies and updates is over my head!

But in my mind, it would be great if, as much as possible, everyone used and built upon one central repo so that we don't wind up with duplicate styles slightly different in many places. If new developers could use what exists as much as possible, then when something new is needed, submit new styles as a pull request and let @juhewitt provide direction to keep gov.bc.ca and new apps as consistent as possible?

For beginners like me, the closer to pure Bootstrap the better.

@Gavin-McLeod
Copy link
Contributor

At TRAN we are looking for a couple of things and I'm probably not thinking of everything now:

  • We need to be able to match a single government standard.
  • We need to be able to react quickly and hopefully costlessly to changes in those standards (because change they surely will).
  • We need the ability to test before use. Nothing would ever deploy directly into a PROD environment. This implies that we would probably generate our own distribution package for in-house use anyway.
  • We need simplicity in deployment/distribution as any number of developers (contracted and otherwise) with varying backgrounds and experience will need to use whatever "it" is.

From the use of earlier versions of the Gov2 templates, the comments from developers have been that they ultimately needed to override so much of the CSS that they thought they would have been better off to just roll their own CSS/JS. I haven't been able to get details on that yet to know how that came about, but this defeats the point of a single distribution.

The notion that there are multiple style repos in play already seems like that may also be a result of what our devs ran into. In any case, if these are going to accumulate, then there might need to be a strategy around this. Ad hoc variations of standards make it very difficult for the rest of us to encourage adherance to any standard. It also makes contract language really really difficult.

@juhewitt
Copy link
Collaborator

Sounds like an opportunity to start again... or from a single repo and move forwards... I vote this one. :)

@GregTurner
Copy link
Author

GregTurner commented Aug 15, 2017

@juhewitt what I'm hearing developers want is:

  1. Bootstrap v4 using SASS
  2. Try to keep it pure bootstrap
  3. Support npm, bower and manual downloads
  4. Provide a demo page to preview styles
  5. Provide good release management to avoid breakages

Anything else?

@foley-lynn
Copy link

If we're going with bootstrap 4, which iirc is in alpha status, we'll need to ensure that however its setup, we can easily capture updates to the core project without nuking our customizations.

@Gavin-McLeod
Copy link
Contributor

As an aside, this is a nearly identical convo to what we were having in 2013 that led to the creation of the IAC.

@eugene-p
Copy link

Just my 2 cents on Sass. There is no need to wait for bootstrap 4. There is an official sass version of bootstrap 3. https://github.com/twbs/bootstrap-sass.

@eugene-p
Copy link

And an opinion on an issue that is being discussed. I would still keep skeleton and a theme as 2 separate repositories. But would make skeleton depend on theme through package.json.

I would have style sample as a part of theme repo and skeleton would be your quick start thing.

@juhewitt
Copy link
Collaborator

I like @eugene-p 's recommenation

@GregTurner
Copy link
Author

Okay, here's a recap of the solution with newer input:

  1. Bootstrap v3 using SASS (v4 once out of beta)
  2. Try to keep it pure bootstrap
  3. Support npm, bower and manual downloads
  4. Provide a demo page to preview styles
  5. Good package/release management to avoid breakages or overwriting customizations.
  6. Provide a skeleton separate from theme

@GregTurner
Copy link
Author

I'm having second thoughts. I think we should change #1 above to:

  1. Bootstrap v4 using SASS

It's in beta, and most people who will come here are in green or blue field. Which means, they'll probably want the goodies of v4:

http://blog.getbootstrap.com/

@Gavin-McLeod
Copy link
Contributor

Greg, are we ready for "Dropped IE8 and IE9 support" ?

@GregTurner
Copy link
Author

@Gavin-McLeod IMO we should purposely avoid anything less than IE 11 because MS doesn't them. Which means they are becoming more and more insecure. Maybe the question should be when do we ban these browsers altogether.

https://www.microsoft.com/en-ca/windowsforbusiness/end-of-ie-support

@Gavin-McLeod
Copy link
Contributor

I really do agree with the sentiment Greg. I'm not sure of the wisdom of dictating to our consumers, citizens of BC and others, their browser choices!

Evidence almost seems to agree with you that exclusive support of IE11 may be justified, Unfortunately I have no good analytics tools to back that up with complete confidence:
Looking at our (TRAN) internal public site, PIWIK doesn't distinguish versions.
Using Webtrends agains the CMS Gov3 site, looking at Transportion theme material, excluding gov traffic, I see no entry for IE11. I do see a version "1." that outstrips version 10 by a factor of 7, and IE as a group represents just over 8% of all visits.

So, don't tell my boss, but yes i would agree with your sentiment if not your approach ;)

@foley-lynn
Copy link

I agree with Bootstrap 4 how that it's in beta.

IE 11+ was specified in the browser matrix for the app I built for the Ministry of Justice.

@GregTurner
Copy link
Author

Same here, in our recent work for MSP we only speced IE 11

https://github.com/bcgov/MyGovBC-MSP

@eugene-p
Copy link

All currently supported versions of Windows are upgradable to IE11. So technically even MS does not support anything below IE11. Supporting old versions of browsers is very expensive and should be decided by the project owners. Here is just a generic library that makes everybody's life easier.

But as the current version of Bootstrap v3 does supports IE 8+.

I think it is a resource management issue. If there are enough resources than v3 and IE 8 are in scope. If not v4 and IE 11.

Anybody knows EOL for Bootstrap 3?

@Gavin-McLeod
Copy link
Contributor

I'm sorry I brought this up!
I was just asking if this is a good idea from more than a technical perspective. The effect of declaring minimum browser versions is that we are saying what our user SHOULD use rather than accounting for what our users DO use. I keep in mind that many of our public users are still on dial-up modems or are otherwise quite restricted when it comes to doing upgrades. Many will be in institutions that have blocked upgrades pending review. The rationales go on!. My own stats say that IE9 is still used more than IE10, although both barely make a blip in the analytics.

The decision to move to new versions can't be just based on technical rationale -- that's all I'm saying.

For the record, I support moving to Bootstrap 4 based on the analytics I've seen so far.

@GregTurner
Copy link
Author

GregTurner commented Aug 23, 2017

@Gavin-McLeod this is a legit issue we should be concerned about because although these stylesheets are not the "standard" they become the defacto standard in practice. I checked and BC Gov (corporately) does not have official standards for browsers for citizens. Other jurisdictions do like UK Gov, they say if the browser has 5% usage then it's supported.

Check out these stats, IE 10 and less don't even register a 0.1 anymore!

https://www.w3schools.com/Browsers/browsers_explorer.asp

@eugene-p
Copy link

@GregTurner Checked http://gs.statcounter.com/browser-version-market-share/desktop/canada#monthly-201607-201707 That is known to be IE heavy. Though market share is higher than on w3school it is well under 5%(check CSV for information)

@Gavin-McLeod
Copy link
Contributor

Looking at our own stats for non-gov traffic hitting the Driving and Transportation theme on the public site, total percentage share for all versions of IE is 8% of visits, and 11% of views over the last month.

Excluding what Webtrends reports as IE version "1." versions that appear to be <v11 only accounts for 0.4% of all views for the month. So the experience we see for our own users (rather than global stats) actually agrees more or less with those global numbers. :)

Interestingly though, by the same arguments, we should be very close to dropping support for all versions of Firefox as well!

@eugene-p
Copy link

@Gavin-McLeod Not 100% true. As there is way less difference between last 10-15 versions of FF than between IE 8 and 9 for example.

So for Chrome, FF, Edge You can just look at total market share. You can enforce minimum version for them though.

@GregTurner
Copy link
Author

@eugene-p because Chrome and FF are evergreen, we could probably safely say current stable version - 1 is the target (moving target!).

@GregTurner
Copy link
Author

FYI, time permitting this month, we're going ahead with the Bootstrap v4 upgrade. If anyone wants to participate in the development and/or testing please let me know.

@juhewitt
Copy link
Collaborator

juhewitt commented Sep 8, 2017

@GregTurner keep me in the loop!

@foley-lynn
Copy link

I don't know that I'll have many free cycles this month, but I'd like to help however I can.

@loneil
Copy link

loneil commented Sep 8, 2017

@GregTurner I'm in to help.

@GregTurner
Copy link
Author

Anyone concerned, I've started a very early repo here:

https://github.com/bcgov/bootstrap-theme

I'll be working on it over the next couple weeks using the feedback collected on this issue.

@mark-a-wilson
Copy link
Contributor

mark-a-wilson commented Oct 6, 2017 via email

@jonathanbell
Copy link
Contributor

Hi,

I feel like this GH issue has turned into more of a discussion than an issue/bug. I'd like to comment too, I guess, on the idea of "Why so many repos about styles?".

I think that the main "Gov 2.0 Skeleton" should be HTML, (S)CSS, and JS only. Reason being is it relies heavily on Bootstrap and Bootstrap itself is just HTML, CSS and JavaScript (and that's what ships to browsers).

Supporting multiple frameworks/things like NPM/Node, Drupal and Wordpress themes, etc. seems like a maintenance nightmare. This repository needs to be simple and clear.

Bootstrap itself makes no assumptions about backend platform on its demo pages: https://getbootstrap.com/docs/4.0/examples/ One just copy/pastes the parts of the source that one needs and weaves that into their templating language into the output of their system.

I think we need a single source of truth for what is to be expected in terms of front-end code for new government apps coming online (ie this repo). Since this skeleton relies so heavily on Bootstrap, I'd say just follow in Bootstrap's footsteps and don't make assumptions about backend technologies. Some of the examples on Bootstrap's own demo page even use some custom CSS/JS which is obviously fine, but needs to be kept separate from Bootstrap core in some regard.

I think the skeleton repo should house:

  • all of Bootstrap v4
  • all the custom markup/CSS/JS files (that wrap/leverage Bootstrap) to make a basic page suitable for BC gov usage
  • a couple example pages, showing off all of the stuff here and various example layouts, just like Bootstrap does. That way, you could just copy/paste the source if you need to get up and running quickly.
  • a version number (of the skeleton, not necessarily tied to Bootstrap versioning)

If folks want to add NPM, and package managing then fine but I still don't really know how we would support backwards compatibility (would we?). Bootstrap itself is not 100% backwards compatible and I (personally) don't have a problem with that. Folks could just work on updating their system front-end each time a new version of the skeleton is released/changed. At least you could say something like, "Oh, we are on version 3 of the BC Gov Skeleton. We are working on updating our template in March."

If folks want to make custom templates/themes using the skeleton for systems like Wordpress or whatever, then more power to them! 💥 Those, however, should be completely separate repos.

@ateucher
Copy link

I agree 100%. Not everyone needs to use a package manager/deployment system - for simple sites they can be more trouble than they're worth. And I really like the idea of a central, simple HTML/JS/CSS skeleton that can be used to build more complex systems.

@rturgano
Copy link
Contributor

I guess I am late to the party. I am glad this repo helped the development/discussion of a simple GOV template system.

Happy retirement "Gov-2.0-Bootstrap-Skeleton" repo, you have served us well.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants