-
Notifications
You must be signed in to change notification settings - Fork 3
ProfileCard component #318
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
base: dev
Are you sure you want to change the base?
Conversation
…card. also updated stories file to refelct new attributes and changes
…fileCard.js and Stories file. Added commented out tests
… Updated link for ProfileCard.mdx and updated failing tests for stories file
maxatdetroit
left a comment
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.
This is definitely moving in the right direction. Some minor things:
- When the profile card is a link (i.e. when the
hrefattribute is provided), would you make sure that a right caret / chevron is added at the end of the person's name? See the mobile mockup screenshot for an example of what I'm talking about. - The vertical margins / padding between the text elements is off from the mockups. Would you go into figma and see what the right design specs are for that and mimic them here?
- Would you update the inline styles in the stories to remove the blue text color on the profile card links in storybook?
- Would you update the documentation page to include a section at the top for 'Usage' that includes Storybook controls? See an example of what I mean here: https://cityofdetroit.github.io/COD-Design-System/?path=/docs/components-tag--tag#usage
…d commented out profilecard code, added a name-container around name and chevron, updated scss to fix position of chevron
…ed storybook to ignore error messages, removed the rest of the validation test code
maxatdetroit
left a comment
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.
Just some minor tweaks at this point but still needs some changes before the component API is stable and ready to merge in.
maxatdetroit
left a comment
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.
This is the last set of feedback, couple minor things inline. Also:
- Could you make it so that the chevron animation happens on hover of any part of the link, not just the name text?
The goal of this task is to create a new profile component in the stable build of the design system.
ProfileCard should be behave the same on Desktop & Mobile:
Mobile
Desktop
Requirements
The width of the component (and component contents) should scale with the parent container
The image src URL should be provided as an attribute on the component.
The name of the individual should be a named slot. The assigned element should be either a link or a span element.
The title(s) of the individual (e.g. Sandra Yu Stahl is both "Deputy Chief Financial Officer" and "Chief Procurement Officer") should be provided as additional named slotted elements. The assigned element should be a span.
Follow the best practices for attributes and slots described in Document best practices in contributing docs #201 , Define attribute naming conventions in contributing docs #202 , and Add contributing docs regarding named slots with basic markup #205
FINAL RESULT:
2025-04-28.15-42-32.mp4