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

Prevent rounded corners in the middle of a BorderBox #2686

Closed

Conversation

HDinger
Copy link
Contributor

@HDinger HDinger commented Mar 12, 2024

What are you trying to accomplish?

In a Primer::Beta::BorderBox there are constellations in which there are rounded corners somewhere in the middle. For example

render(Primer::Beta::BorderBox.new) do |component|
  component.with_header { "Header" }
  component.with_body { "Body" }
  component.with_row { "Row one" }
  component.with_row { "Row two" }
end

Screenshots

Bildschirmfoto 2024-03-12 um 08 57 25

List the issues that this change affects.

Closes #2684

Risk Assessment

  • Low risk the change is small, highly observable, and easily rolled back.
  • Medium risk changes that are isolated, reduced in scope or could impact few users. The change will not impact library availability.
  • High risk changes are those that could impact customers and SLOs, low or no test coverage, low observability, or slow to rollback.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Added/updated previews (Lookbook)
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@HDinger HDinger requested review from a team as code owners March 12, 2024 08:16
@HDinger HDinger requested a review from langermank March 12, 2024 08:16
Copy link

changeset-bot bot commented Mar 12, 2024

🦋 Changeset detected

Latest commit: c3c60f0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/view-components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -89,7 +89,7 @@
border-bottom: var(--borderWidth-thin) solid var(--borderColor-default);

/* Ensures bottom-border doesn't poke out when .Box-body used without box-footer */
&:last-of-type {
&:last-child {
Copy link
Member

Choose a reason for hiding this comment

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

An issue with this selector is we often have hidden elements at the end of the rows in our markup

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to re-create such an example, but failed. When looking at the html of the BorderBox, there is no hidden element defined, and the slot definitions do not accept blocks as arguments either.

<%= render Primer::BaseComponent.new(**@system_arguments) do %>
  <%= header %>
  <%= body %>
  <% if rows.any? %>
    <%= render Primer::BaseComponent.new(**@list_arguments) do %>
      <% rows.each do |row| %>
        <%= row %>
      <% end %>
    <% end %>
  <% end %>
  <%= footer %>
<% end %>

Could you give me a hint, on how to create an example with hidden elements at the end of the rows?

Copy link
Contributor

Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days.

@github-actions github-actions bot added the Stale Automatically marked as stale. label May 18, 2024
@github-actions github-actions bot closed this May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Automatically marked as stale.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

First row below the header in Primer::Beta::Box has rounded corners
2 participants