Skip to content

Conversation

@dandimeo
Copy link
Contributor

@dandimeo dandimeo commented Oct 3, 2023

Description

Implement a {{< button link="" color="green/grey" >}}
to display a button

Example usage is shown in 3.11 homepage

3.11/_index.md content has to be reverted before merging

Upstream PRs

  • 3.10:
  • 3.11:
  • 3.12:

@arangodb-docs-automation
Copy link
Contributor

Deploy Preview Available Via
https://deploy-preview-259--docs-hugo.netlify.app

@dandimeo dandimeo marked this pull request as draft October 3, 2023 15:28
@dandimeo dandimeo requested review from Simran-B and nerpaula October 4, 2023 12:45
@dandimeo dandimeo marked this pull request as ready for review October 4, 2023 12:45

Normal button

{{< button text="Sign Up" color="green" position="right" >}}
Copy link
Contributor

@Simran-B Simran-B Oct 10, 2023

Choose a reason for hiding this comment

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

text seems unnecessary/unused as we pass the label text in the body of the shortcode (.Inner).

What does position actually do?

@nerpaula
Copy link
Contributor

@nikhil-varma can you please review the CSS changes to ensure that the styling of the buttons are aligned with the AG ones?

@nerpaula nerpaula requested a review from nikhil-varma October 10, 2023 13:47
border: none;
cursor: pointer;
width: fit-content;
height: 2rem;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use px instead of rem.. Ideally they should be used only for fonts .. But having px is much more consistent

height: 2rem;
}

.button__wrapper__green {
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of such big names.. we can say button.primary and use it as button primary. Similar for others

Copy link
Contributor

Choose a reason for hiding this comment

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

Well contextually.. can be button.green or button.red also. However, a more non-implicit naming convention like above is easier to understand and use it consistently.

}

.button__link {
padding: 5px 1em 5px 1em;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's use px instead of mixed values.

.deactivated {
pointer-events: none;
cursor: none;
border-bottom: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this for button?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for the button but will be removed in next commit

}

.button__text {
border-bottom: 2px solid var(--green-600);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this not be a part of button itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing it to be part of button will display the border bottom with size of the entire button. By keeping as it is the border will be the size of the text

@nikhil-varma
Copy link
Contributor

@nerpaula Done!

@dandimeo dandimeo requested a review from nikhil-varma October 10, 2023 14:51
@dandimeo
Copy link
Contributor Author

@nikhil-varma re-done the shortcode and css from scratch. Much more clever now. Could you please review it now?

@nikhil-varma
Copy link
Contributor

@dandimeo Nice! That was my suggestion before as well.

Copy link
Contributor

@nerpaula nerpaula left a comment

Choose a reason for hiding this comment

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

Thanks @dandimeo!

@nerpaula nerpaula merged commit f8153fe into main Oct 18, 2023
@nerpaula nerpaula deleted the DOC-589 branch October 18, 2023 13:05
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.

5 participants