-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix a few visual glitches #2883
Conversation
You can access the deployment of this PR at https://renku-ci-ui-2883.dev.renku.ch |
<Clipboard clipboardText={props.commit.id}> | ||
<code>{props.commit.short_id}</code> | ||
</Clipboard> |
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.
It doesn't make sense to have a <Clipboard>
inside a <Button>
.
Maybe try to use <span>
instead of <Button>
, and add btn
to the <Clipboard>
classname.
<span id={idCopyButton}>
<Clipboard classname={cx("btn", "border")} clipboardText={props.commit.id}>
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 kept the buttons to avoid spending time updating the styling.
I agree this solution isn't optimal, but this tab might disappear soon so I wouldn't spend more time on it
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 works, and it doesn't have any oddities:
<ButtonGroup
className="text-monospace m-auto commit-buttons"
size="sm"
>
<span id={idCopyButton}>
<Clipboard
className="btn border rounded-start"
clipboardText={props.commit.id}
>
<code>{props.commit.short_id}</code>
</Clipboard>
</span>
<UncontrolledTooltip placement="top" target={idCopyButton}>
Copy commit SHA
</UncontrolledTooltip>
<ExternalLink
id={idBrowseButton}
title={<FontAwesomeIcon icon={faFolderOpen} />}
url={urlBrowse}
color="rk-background"
className="text-primary last-item-button-group border"
/>
<UncontrolledTooltip placement="top" target={idBrowseButton}>
Browse files
</UncontrolledTooltip>
</ButtonGroup>
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.
Vertical alignment seems a bit off with that solution. For comparison, on the left side is the code from the PR, while on the right it's your suggestion. Mind the vertical alignment
.
I removed the unnecessary hidden button (see 5c9b3af ) since that was admittedly bad, and replaced it by playing around with the rounded-*
classes.
I suggest to keep the button with clipboard to avoid spending more time on this -- that was already the previous solution after all.
</Button> | ||
<UncontrolledTooltip placement="top" target={idCopyButton}> | ||
Copy commit SHA | ||
</UncontrolledTooltip> | ||
<Button className="d-none"></Button> |
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.
Why is there a hidden button?
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.
To use the buttons group styling. Same reason as above: the tab might disappear soon so let's just fix the visual appearance
Source | ||
</td> | ||
<td className="bg-transparent">{source}</td> | ||
<td>{source}</td> | ||
</tr> | ||
) : null} | ||
{dataset.published?.creator?.length >= 3 ? ( |
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.
non-blocking: the logic here is weird and creates an empty card above the description.
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 don't get empty cards, could you share an example? Or perhaps I'm missing it 🤔
Still, the logic is indeed weird 😄 If it's about improving what we show on the dataset page, let's keep it separate from the CSS/classes changes in this PR
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 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.
Oh, interesting! I got contradicting outputs and, after digging a bit into this, I found out that KG occasionally return responses for non-indexed projects (i.e. when the same database has been used in another project that happens to be indexed) 🤯
Anyway, I managed to reproduce the issue
I couldn't understand how authors/source work, but I changed it slightly. Actually, that was probably a bad decision and I should have made a separate PR (or issue) to prevent "patchwork PRs" changing random stuffs together but... it was just quicker and I couldn't resist the temptation 🤷
Thanks for the review! I added the style/visual changes, but I didn't update the components used for the commits since that tab is likely to disappear soon (or be re-written anyway). I agree the current solution is... non-optimal 😬 |
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.
LGTM 🚀 thanks for the changes 🙏
Tearing down the temporary RenkuLab deplyoment for this PR. |
There are quite a few visual glitches that piled up with time, most of them coming from updates to bootstrap defaults.
This PR addresses some of them. Here is a list to simplify the review:
/deploy