Skip to content

Commit

Permalink
Merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
camertron committed Oct 11, 2024
2 parents 434e4b7 + 978e867 commit 686ecf0
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/lemon-kiwis-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/view-components": patch
---

Add "action" to the list of data attributes that accept multiple values in the `merge_data` helper
5 changes: 5 additions & 0 deletions .changeset/wicked-bananas-tie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/view-components': patch
---

Remove dialog-scrollgutter setting from hot-path, for improved performance
18 changes: 16 additions & 2 deletions app/components/primer/alpha/dialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,27 @@

/* Overlay */

/* The --dialog-scrollgutter property is used only on the body element to
* simulate scrollbar-gutter:stable. This property is not and should not
* be used elsewhere in the DOM. There is a performance penalty to
* setting inherited properties which can cause a large style recalc to
* occur, so it benefits us to prevent inheritance for this property.
* See https://web.dev/blog/at-property-performance
*/
@property --dialog-scrollgutter {
initial-value: 0;
inherits: false;
syntax: "<length>";
}

/*
Remove these disables when we can upgrade to the latest version of @primer/stylelint-config.
See: https://github.com/3846masa/stylelint-browser-compat/pull/807
Remove these no-unsupported-browser-features disables when we can upgrade to the latest
version of @primer/stylelint-config. See: https://github.com/3846masa/stylelint-browser-compat/pull/807
*/

/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
body:has(:modal) {
/* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
padding-right: var(--dialog-scrollgutter) !important;
}

Expand Down
2 changes: 1 addition & 1 deletion app/lib/primer/attributes_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Primer
# :nodoc:
module AttributesHelper
PLURAL_ARIA_ATTRIBUTES = %i[describedby labelledby].freeze
PLURAL_DATA_ATTRIBUTES = %i[target targets].freeze
PLURAL_DATA_ATTRIBUTES = %i[target targets action].freeze

def aria(val, system_arguments)
system_arguments[:"aria-#{val}"] || system_arguments.dig(:aria, val.to_sym)
Expand Down

0 comments on commit 686ecf0

Please sign in to comment.