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

Bump/primer upstream 0.36.5 #229

Merged
merged 10 commits into from
Jan 28, 2025
5 changes: 5 additions & 0 deletions .changeset/poor-parrots-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openproject/primer-view-components': patch
---

Ensure counter content is exposed to screen reader users
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,9 @@ jobs:
uses: phulsechinmay/[email protected]
with:
message: |
### ⚠️ Visual or Semantic markup differences found
### ⚠️ Visual or ARIA snapshot differences found

Our visual and semantic markup comparison tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.
Our visual and ARIA snapshot tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.


[Review differences](https://github.com/opf/view_components/pull/${{ github.event.number }}/files?file-filters%5B%5D=.png&file-filters%5B%5D=.yml&show-viewed-files=false)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- button "Button"
- button "Button"
- button "Button"
- button "Button ( )": Button ()
- button "Button ( )": Button ()
- button "Button ( )": Button ()
- button "Button ( 15 )"
- button "Button ( 15 )"
- button "Button ( 15 )"
- button "Button with tooltip"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- button "Star ( )": Star ()
- button "Star ( 15 )"
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- button "Comment ( )": Comment ()
- button "Comment ( 15 )"
2 changes: 1 addition & 1 deletion app/components/primer/beta/button.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<% if trailing_visual %>
<span class="Button-visual Button-trailingVisual">
<% if @trailing_visual_counter %>
<span class="d-flex" aria-hidden="true"><%= trailing_visual %></span>
<span class="sr-only">(<%= trailing_visual %>)</span>
<%= trailing_visual %>
<% else %>
<%= trailing_visual %>
<% end %>
Expand Down
3 changes: 2 additions & 1 deletion app/components/primer/beta/button.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class Button < Primer::Component
label: Primer::Beta::Label,
counter: lambda { |**system_arguments|
@trailing_visual_counter = true
Primer::Beta::Counter.new("aria-hidden": true, **system_arguments)
Primer::Beta::Counter.new(**system_arguments)
}
}

Expand Down Expand Up @@ -108,6 +108,7 @@ class Button < Primer::Component
# @param align_content [Symbol] <%= one_of(Primer::Beta::Button::ALIGN_CONTENT_OPTIONS) %>
# @param tag [Symbol] (Primer::Beta::BaseButton::DEFAULT_TAG) <%= one_of(Primer::Beta::BaseButton::TAG_OPTIONS) %>
# @param type [Symbol] (Primer::Beta::BaseButton::DEFAULT_TYPE) <%= one_of(Primer::Beta::BaseButton::TYPE_OPTIONS) %>
# @param inactive [Boolean] Whether the button looks visually disabled, but can still accept all the same interactions as an enabled button.
# @param disabled [Boolean] Whether or not the button is disabled. If true, this option forces `tag:` to `:button`.
# @param label_wrap [Boolean] Whether or not the button label text wraps and the button height expands.
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
Expand Down
2 changes: 2 additions & 0 deletions demo/kuby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def install_from_image(image, dockerfile)
password ENV["AZURE_ACR_PASSWORD"]
end

setup_phase.base_image = "ruby:3.3"

image_url ENV["IMAGE_URL"] || "primer.azurecr.io/primer/view_components_storybook"

# Run bundler, npm, etc in this directory.
Expand Down
48 changes: 24 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion previews/primer/alpha/tooltip_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def tooltip_with_button(direction: :s, tooltip_text: "You can press a button")

# @label Tooltip with Primer::Beta::Link
def tooltip_with_link(direction: :s, tooltip_text: "You can press a button")
render(Primer::Beta::Link.new(href: "#link-with-tooltip", id: "link-with-tooltip")) do |component|
render(Primer::Beta::Link.new(href: "#link-with-tooltip", id: "link-with-tooltip", underline: true)) do |component|
component.with_tooltip(text: tooltip_text, direction: direction)
"Button"
end
Expand Down
6 changes: 6 additions & 0 deletions static/arguments.json
Original file line number Diff line number Diff line change
Expand Up @@ -3646,6 +3646,12 @@
"default": "`:button`",
"description": "One of `:button`, `:reset`, or `:submit`."
},
{
"name": "inactive",
"type": "Boolean",
"default": "N/A",
"description": "Whether the button looks visually disabled, but can still accept all the same interactions as an enabled button."
},
{
"name": "disabled",
"type": "Boolean",
Expand Down
6 changes: 6 additions & 0 deletions static/info_arch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12186,6 +12186,12 @@
"default": "`:button`",
"description": "One of `:button`, `:reset`, or `:submit`."
},
{
"name": "inactive",
"type": "Boolean",
"default": "N/A",
"description": "Whether the button looks visually disabled, but can still accept all the same interactions as an enabled button."
},
{
"name": "disabled",
"type": "Boolean",
Expand Down
Loading