-
Notifications
You must be signed in to change notification settings - Fork 4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, your screenshot looks a nice improvement
Do we use this for anything other than GOV.UK 2nd line? I'm a bit uneasy about this change as it feels like an introduction of a coupling to a particular project (2nd line dashboard) when this was previously a very generic project.
I wonder if this should instead have an approach like modern CSS frameworks where there are classes specified for different viewport sizes that override more generic ones (for example where tachyons has suffixes on classes to indicate what media queries they apply to: https://tachyons.io/docs/layout/widths/) - I appreciate that increases this scope though (maybe one day I'll finish the 2nd line dashboard I started that is responsive)
I often have the 2nd line dashboard open on my Macbook, now that we're no longer in the office and have it on the big screen. I tend to have it on half my external monitor, leaving the other half for another window such as Nagstamon. Currently, even on this relatively large real estate of ~980px, content is cut-off. This commit attempts to improve the UI using media queries. | Before | After | |--------|------| |![before](https://user-images.githubusercontent.com/5111927/102879725-2be6ac00-4442-11eb-9459-26ac3434fef2.png)|![after](https://user-images.githubusercontent.com/5111927/102879724-2b4e1580-4442-11eb-8408-875971af07b5.png)| Rather than hack the existing `layout-2x1-75-25` class used by the 2nd line dashboard (and risk introducing unexpected changes for other teams), I've created a new `layout-2x1-responsive` class. It looks identical on the build.html screen, so I've added an animation to differentiate the preview: https://user-images.githubusercontent.com/5111927/103345974-b9517e00-4a8a-11eb-8867-c8e55996ec5c.mov I did consider adding utility classes as suggested here: #3 (review) ...but the build mechanism only allows for passing one class name at a time, so I think this problem is best solved with a media query. Once this is merged, we'll need to edit the 2nd line dashboard link here: https://github.com/alphagov/govuk-developer-docs/blame/800ed1f6a45ee0ab3493d4f4e33e249e5ac80470/source/manual/2nd-line.html.md#L20
b8a104a
to
96efd93
Compare
I often have the 2nd line dashboard open on my Macbook, now that we're no longer in the office and have it on the big screen. I tend to have it on half my external monitor, leaving the other half for another window such as Nagstamon. Currently, even on this relatively large real estate of ~980px, content is cut-off. This commit attempts to improve the UI using media queries. | Before | After | |--------|------| |![before](https://user-images.githubusercontent.com/5111927/102879725-2be6ac00-4442-11eb-9459-26ac3434fef2.png)|![after](https://user-images.githubusercontent.com/5111927/102879724-2b4e1580-4442-11eb-8408-875971af07b5.png)| Rather than hack the existing `layout-2x1-75-25` class used by the 2nd line dashboard (and risk introducing unexpected changes for other teams), I've created a new `layout-2x1-responsive` class. It looks identical on the build.html screen, so I've added an animation to differentiate the preview: https://user-images.githubusercontent.com/5111927/103345974-b9517e00-4a8a-11eb-8867-c8e55996ec5c.mov Once this is merged, we'll need to edit the 2nd line dashboard link here: https://github.com/alphagov/govuk-developer-docs/blame/800ed1f6a45ee0ab3493d4f4e33e249e5ac80470/source/manual/2nd-line.html.md#L20
96efd93
to
c3e6dcf
Compare
A CSS viewport framework approach is a nice idea, but does increase the scope and feels a bit over-engineered to me, given this is just to scratch a personal itch. However, I do share your concern about changing the behaviour of a class that may be being relied upon by other teams (and also muddying its intent). I've created a new class which hopefully gives us the freedom to build it how we like - and it gave me an excuse to play around with CSS animations for the build page!
Nice project! It looks like a good first step to replacing the current dashboard, which apart from being desktop-centric is also a bit of a pain to set up initially, as you need to dig out the Zendesk credentials to load that portion of the dash. I did experiment with passing a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one Chris - fancy work on the animation. This seems a good pragmatic approach.
Displays better on smaller screens. See alphagov/frame-splits#3 Also adds title to the web page.
I often have the 2nd line dashboard open on my Macbook, now that
we're no longer in the office and have it on the big screen.
I tend to have it on half my external monitor, leaving the other
half for another window such as Nagstamon.
Currently, even on this relatively large real estate of ~980px,
content is cut-off. This commit attempts to improve the UI using
media queries.
Rather than hack the existing
layout-2x1-75-25
class used bythe 2nd line dashboard (and risk introducing unexpected changes
for other teams), I've created a new
layout-2x1-responsive
class.It looks identical on the build.html screen, so I've added an
animation to differentiate the preview:
Untitled.mov
Once this is merged, we'll need to edit the 2nd line dashboard
link here:
https://github.com/alphagov/govuk-developer-docs/blame/800ed1f6a45ee0ab3493d4f4e33e249e5ac80470/source/manual/2nd-line.html.md#L20