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

Fix a few visual glitches #2883

Merged
merged 9 commits into from
Nov 9, 2023
Merged

Fix a few visual glitches #2883

merged 9 commits into from
Nov 9, 2023

Conversation

lorenzo-cavazzi
Copy link
Member

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:

  • Remove badges customization
    01_badge
  • Update the list items defaults -- a few pages were slightly adjusted, like the commits tab:
    02_commits
  • Set transparent background on popovers:
    03_popovers
  • Set transparent background on tables:
    04_transparent_background
  • Adjust other custom elements:
    image

/deploy

@lorenzo-cavazzi lorenzo-cavazzi requested a review from a team as a code owner November 7, 2023 14:41
@RenkuBot
Copy link
Contributor

RenkuBot commented Nov 7, 2023

You can access the deployment of this PR at https://renku-ci-ui-2883.dev.renku.ch

@leafty leafty self-requested a review November 7, 2023 14:49
Comment on lines +161 to +163
<Clipboard clipboardText={props.commit.id}>
<code>{props.commit.short_id}</code>
</Clipboard>
Copy link
Member

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}>

Copy link
Member Author

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

Copy link
Member

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>

image

Copy link
Member Author

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
image.

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>
Copy link
Member

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?

Copy link
Member Author

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 ? (
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

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

The empty card here:

image

Copy link
Member Author

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
image

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 🤷
image

@lorenzo-cavazzi
Copy link
Member Author

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 😬

Copy link
Member

@leafty leafty left a 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 🙏

@RenkuBot
Copy link
Contributor

RenkuBot commented Nov 9, 2023

Tearing down the temporary RenkuLab deplyoment for this PR.

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.

3 participants