-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add user metadata #61
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.
Looking at the code, it looks like you're missing the MetadataMetadata in testtupleSummary.js
const keys = Object.keys(metadata); | ||
|
||
const li = css` | ||
font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace |
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.
There is a monospaceFamily
variable available that you should use instead.
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.
Indeed, thanks!
@maeldebon could you include a screenshot of your recent changes? |
That would be great! |
I updated the description |
@@ -160,6 +169,27 @@ OwnerMetadata.defaultProps = { | |||
owner: '', | |||
}; | |||
|
|||
export const MetadataMetadata = ({metadata}) => { | |||
const keys = Object.keys(metadata); |
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.
I think you're missing sorted() here as well :)
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.
Yes indeed!
@@ -35,10 +35,13 @@ const baseDd = css` | |||
|
|||
const metadataDt = css` | |||
text-transform: initial; | |||
font-family: ${monospaceFamily}; | |||
margin-left: ${spacingSmall}; |
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.
You could use padding-left here, it would avoid having to specify a negative left margin the metadataDd class.
{keys.sort().map((key) => ( | ||
<SingleMetadata labelClassName={metadataDt} valueClassName={metadataDd} key={key} label={key} value={metadata[key]} />))} | ||
{keys.map((key) => ( | ||
<SingleMetadata labelClassName={metadataDt} valueClassName={metadataDd} key={key} label={`- ${key}`} value={metadata[key]} />))} |
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.
Including the -
like this works visually, but it introduces an unwanted behavior: When selecting the key, you'll also select the -
. I guess this will also be picked up by screen readers.
One solution could be to have the metadataDt
updated with:
&:before {
content: '- ';
}
Of course, the best solution would be to have an actual list, but in order to keep this short, the above solution should be enough.
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.
You're right, it will be better this way
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.
As I said in a previous review, it looks like you're missing the MetadataMetadata in testtupleSummary.js, but this is otherwise very nice!
Hello @maeldebon, since you're not available this week I took the liberty to add metadata to the TesttupleSummary and to fix a couple of bugs:
Excellent work otherwise! |
* Add helm chart linting * Fix typo * Add building & linting to PR approval process * Reduce validate-pr length * Auto-format * fix build * name steps * Separate build job in validate-pr for speed * Fix validate-pr workflow Co-authored-by: Jérémy Morel <jeremy.morel@owkin.com>
This PR aims to add assets' metadata field to the frontend.
These metadata are currently displayed as follows.
When there are metadata:
When there are no metadata: