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

Feat/accessibility-videos-2008: added new videos section #2009

Merged

Conversation

amandadupell
Copy link
Contributor

What does this PR do?

Add new videos section to Accessibility page

Where should the reviewer start?

Accessibility page. Then LinkCards.js and SectionCards.js

What testing has been done on this PR?

Manual testing

In addition to the feature you are implementing, have you checked the following:

  • Console is free of warnings and errors
  • Light & dark modes
  • Small, medium, and large screen sizes
  • Cross-browsers (FireFox, Chrome, and Safari)
  • Keyboard interactions
  • Screen reader experience

How should this be manually tested?

Deploy link or running locally

Any background context you want to provide?

What are the relevant issues?

#2008 #1816

Screenshots (if appropriate)

Screen Shot 2021-11-02 at 2 47 43 PM

Should this PR be mentioned in Design System updates?

Yes

Is this change backwards compatible or is it a breaking change?

Copy link
Collaborator

@halocline halocline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation looks sound. My comments regard trying to think of this work not just in solving for the immediate problem, but also how this work might be used in the future. This is a balancing act. We don't want to over optimize, but we do want to think modularly which allows for code to be composed and reused.

@@ -21,7 +21,11 @@ export const LinkCard = ({ title, link }) => {
background="background-back"
flex={false}
>
<LinkIcon size="large" />
{type === 'guides' ? (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though this works, from a design perspective, this probably doesn't scale very well. If we were to add a handful more "types", this could get messy.

What if LinkCard could be "dumb" and not have any logic in it? We could make it so that it just a presentation/layout component and the caller could pass it anything they want.

export const LinkCard = ({ icon, link, title }) => {


const SectionCards = ({ items, type }) => {
const size = useContext(ResponsiveContext);
const href =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my previous comment, how can we make this be more "dumb" and let the caller supply the href?

What happens when we like this pattern and want to use this section of cards for a bunch of Figma tutorial videos also? We don't want to have to manage the data and mapping logic within SectionCards. Instead, let's make SectionCards be "super accommodating" (liking that phrase better than 'dumb"), so much so as "Just give me: 1) a list of objects -- I don't care what they are or represent -- they just need to have a 'title', 'link/url', [and maybe an 'icon'], and 2) an object for "see all" which has a call-to-action label and an url.

This file then could be moved under 'src/components/cards'... then the data plus the

export const GuideSection = () => <SectionCards type="guides" items={guides} />;
export const VideoSection = () => <SectionCards type="videos" items={videos} />;

could be small files living under accessibility, while the rest of the site could consume this pattern as well.

aries-site/src/pages/foundation/accessibility.mdx Outdated Show resolved Hide resolved
Copy link
Collaborator

@halocline halocline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! Hopefully this structure makes sense. Let me know if you'd like to talk through the rationale.

Also, can you double check for "console is free from errors and warnings"?

Copy link
Collaborator

@taysea taysea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@taysea taysea requested a review from halocline November 4, 2021 20:48
@halocline halocline merged commit 5c4b020 into grommet:master Nov 4, 2021
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

Successfully merging this pull request may close these issues.

Add New Designer and Developer Videos Section to Accessibility Page
3 participants