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

Reusable components #347

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Reusable components #347

wants to merge 3 commits into from

Conversation

jameshadfield
Copy link
Member

Begins an implementation of the components introduced in #305

See /testing for a demonstration

This allows development (via `npm run dev`) of pages
which rely on an API call to `/whoami`. As of PR 321 [1]
the data from this API are more widely accessible.

[1] #321
As we expand the number of pages rendered by gatsby it becomes
more important to expose a small number of reusable components
which pages can use (see [1] for more).

Here we implement the concept of "panels" which are displayed in
a flexbox layout. Panels may contain custom content (we expose
`<Panel>` for this, or they may display a selection of cards
`<PanelWithCards`).

The exact breakpoints etc need further work, probably at a time
when the other components have been implemented.

Note that this commit intentionally includes content which should
be removed before release, either by subsequent commits or by
ammending this commit:
* /testing page
* wireframes around components

[1] #305
@tsibley tsibley temporarily deployed to nextstrain-s-cards-comp-pzraom June 4, 2021 06:26 Inactive
@eharkins eharkins mentioned this pull request Jun 22, 2021
Base automatically changed from next to master June 28, 2021 06:25
eharkins added a commit that referenced this pull request Jul 28, 2021
temp solution for cards is to allow the Cards
component to use flexbox instead of bootstrap
for a more compact, two-column layout. This
will be refactored when we address the design
and flexibility of these components in #305, #347.

TODO:
- might need to unsquash ncov and narratives cards
to be able to read them on mobile
- allowing page sections to tile horizontally,
e.g. groups alongside sars cov 2 as in james' sketch
- more testing
jameshadfield added a commit that referenced this pull request Aug 1, 2021
Minor CSS tweaks from testing across a range of screen sizes and
different mobile devices. There is (minor) issue whereby cards without
an image (e.g. representing groups), at small screen sizes where the
width is a percentage not a pixel value, will be slightly wider than
those with an image. This appears on iPhone 6-8 plus.

Note that upcoming work, such as PR 347
(#347) will focus on
the scalability and reuse of the Cards components.
@tsibley tsibley marked this pull request as draft February 15, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants