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 #72

Merged
merged 69 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
70b95a1
Release Tracking (#2479)
primer[bot] Jan 4, 2024
9ce69ce
Bump tj-actions/changed-files from 40.2.2 to 41.0.1 (#2474)
dependabot[bot] Jan 4, 2024
269c1cb
Bump eslint from 8.43.0 to 8.56.0 (#2472)
dependabot[bot] Jan 4, 2024
8145293
Bump @primer/css from 21.1.0 to 21.1.1 (#2471)
dependabot[bot] Jan 4, 2024
8e1ea8b
Bump @oddbird/popover-polyfill from 0.3.6 to 0.3.7 (#2470)
dependabot[bot] Jan 4, 2024
321cb48
Bump stylelint and stylelint-config-standard (#2469)
dependabot[bot] Jan 4, 2024
cbae5de
Bump importmap-rails from 1.2.3 to 2.0.1 in /demo (#2490)
dependabot[bot] Jan 8, 2024
7271c24
Bump stimulus-rails from 1.3.0 to 1.3.3 in /demo (#2488)
dependabot[bot] Jan 8, 2024
882ed8b
Bump view_component from 3.8.0 to 3.9.0 in /demo (#2480)
dependabot[bot] Jan 8, 2024
d1fcf65
Bump puma from 6.4.0 to 6.4.2 in /demo (#2489)
dependabot[bot] Jan 8, 2024
90ba1b1
Bump hotwire-livereload from 1.3.0 to 1.3.1 in /demo (#2487)
dependabot[bot] Jan 8, 2024
87cef0c
Bump postcss from 8.4.32 to 8.4.33 (#2481)
dependabot[bot] Jan 8, 2024
ff5c688
Bump axe-core from 4.8.2 to 4.8.3 (#2482)
dependabot[bot] Jan 8, 2024
d7110b1
Bump @primer/stylelint-config from 12.8.0 to 12.9.1 (#2483)
dependabot[bot] Jan 8, 2024
ba1b33b
Bump @primer/primitives from 7.15.4 to 7.15.5 (#2484)
dependabot[bot] Jan 8, 2024
3a3ed32
Bump @playwright/test from 1.40.0 to 1.40.1 (#2485)
dependabot[bot] Jan 8, 2024
74d3b55
Bump puma from 6.4.0 to 6.4.2 (#2486)
dependabot[bot] Jan 8, 2024
dc7990c
Fix static build
jonrohan Jan 8, 2024
6d7988e
Generating static files
primer-css Jan 8, 2024
11b1eec
Fixing the utilities build not matching properly for `font_size` (#2491)
jonrohan Jan 8, 2024
8e2475b
Generating static files
primer-css Jan 8, 2024
9d7ddaf
generate image previews for position left/right dialog (#2497)
keithamus Jan 11, 2024
242ae1c
Generating static files
primer-css Jan 11, 2024
fbaea76
Allow setting `test_selector` on select list options (#2495)
antn Jan 11, 2024
461730f
Add descriptive text for `Tooltip` example (#2498)
TylerJDev Jan 15, 2024
cbef3a9
Bump view_component from 3.9.0 to 3.10.0 in /demo (#2499)
dependabot[bot] Jan 15, 2024
0e888c8
Bump minitest from 5.20.0 to 5.21.1 (#2509)
dependabot[bot] Jan 15, 2024
047dc60
Bump actions/cache from 3.3.2 to 3.3.3 (#2508)
dependabot[bot] Jan 15, 2024
773e896
Bump tj-actions/changed-files from 41.0.1 to 41.1.1 (#2507)
dependabot[bot] Jan 15, 2024
3ad6079
Bump bootsnap from 1.17.0 to 1.17.1 (#2506)
dependabot[bot] Jan 15, 2024
70ad394
Bump cssnano from 6.0.2 to 6.0.3 (#2505)
dependabot[bot] Jan 15, 2024
3a64c67
Bump markdownlint-cli2 from 0.11.0 to 0.12.1 (#2504)
dependabot[bot] Jan 15, 2024
8176832
Bump @typescript-eslint/parser from 6.14.0 to 6.18.1 (#2503)
dependabot[bot] Jan 15, 2024
0527882
Bump eslint-plugin-prettier from 5.0.1 to 5.1.3 (#2502)
dependabot[bot] Jan 15, 2024
52ee1ef
Bump @primer/behaviors from 1.3.6 to 1.5.1 (#2501)
dependabot[bot] Jan 15, 2024
5a9f675
Bump bootsnap from 1.17.0 to 1.17.1 in /demo (#2500)
dependabot[bot] Jan 15, 2024
b0b08d5
Bump follow-redirects from 1.15.2 to 1.15.4 in /demo (#2493)
dependabot[bot] Jan 15, 2024
b06fbda
Propose removing the validate classname check that forces system argu…
jonrohan Jan 16, 2024
ea6d18a
Revert "Propose removing the validate classname check that forces sys…
jonrohan Jan 16, 2024
94837bc
Fix codespaces by locking solargraph version and using Ruby 3 (#2512)
camertron Jan 16, 2024
f81fd16
Adjust devcontainer variant so prebuilds will work
camertron Jan 16, 2024
dfd306c
Use newer ms base image so prebuilds will work
camertron Jan 16, 2024
983e3a5
Refactor Dialog to use `<dialog>` internally (#2496)
keithamus Jan 17, 2024
faf3f89
Generating static files
primer-css Jan 17, 2024
a9bda11
Debug
camertron Jan 17, 2024
91081ec
Get more specific
camertron Jan 17, 2024
c03416e
Sudo?
camertron Jan 17, 2024
c1c75f4
Use bundle config set --local instead of passing the --path option
camertron Jan 17, 2024
f732096
Merge branch 'main' of github.com:primer/view_components
camertron Jan 17, 2024
9757311
Adjust migration guide URLs (#2513)
TylerJDev Jan 17, 2024
6cd97cc
Fixup animations in dialog (#2515)
keithamus Jan 18, 2024
2019cbf
Generating static files
primer-css Jan 18, 2024
15a090a
Only attach validation IDs to form elements that support validation (…
camertron Jan 22, 2024
1d14d5c
Bump popover-polyfill to v0.3.8 (#2530)
camertron Jan 22, 2024
226ad35
Break up button text when it is too long (#2514)
langermank Jan 22, 2024
d5b4d84
Add `href` to some previews that use a link (#2529)
TylerJDev Jan 23, 2024
316e0f4
Update button.pcss (#2532)
langermank Jan 24, 2024
09fae5f
ensure dialog is position: fixed (#2533)
keithamus Jan 24, 2024
dbc9f31
Bump stylelint from 16.1.0 to 16.2.0 (#2526)
dependabot[bot] Jan 24, 2024
5dc97a3
Bump tj-actions/changed-files from 41.1.1 to 42.0.0 (#2523)
dependabot[bot] Jan 24, 2024
0266fd2
Revert "Update button.pcss" (#2535)
keithamus Jan 24, 2024
1065fc6
Revert "Break up button text when it is too long" (#2537)
keithamus Jan 24, 2024
9985fc0
Bump @primer/primitives (#2539)
camertron Jan 24, 2024
35e5d06
Prevent ActionMenu's show_button slot from rendering its content more…
camertron Jan 24, 2024
4b2200e
dialog should prevent scrolling when open (#2542)
keithamus Jan 25, 2024
d246fa8
Generating static files
primer-css Jan 25, 2024
116a343
Allow `Banner` to be rendered as a section (#2541)
khiga8 Jan 26, 2024
8f54ce5
Generating static files
primer-css Jan 26, 2024
91936a5
Merge branch 'bump/primer-upstream-ref' into bump/primer-upstream
HDinger Jan 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/healthy-needles-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openproject/primer-view-components": patch
---

Allow setting `test_selector` on select list options
5 changes: 5 additions & 0 deletions .changeset/late-windows-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openproject/primer-view-components": patch
---

Prevent ActionMenu's show_button slot from rendering its content more than once
5 changes: 5 additions & 0 deletions .changeset/nine-turtles-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openproject/primer-view-components": patch
---

Allow `Banner` to be rendered as a section
5 changes: 5 additions & 0 deletions .changeset/rotten-shirts-march.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openproject/primer-view-components": patch
---

Update @oddbird/popover-polyfill to v0.3.8
5 changes: 5 additions & 0 deletions .changeset/silent-lies-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openproject/primer-view-components": minor
---

Use latest version of @primer/primitives
5 changes: 5 additions & 0 deletions .changeset/tall-bugs-laugh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openproject/primer-view-components": patch
---

Fixing the utilities build not matching properly for `font_size`
5 changes: 5 additions & 0 deletions .changeset/wet-fishes-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openproject/primer-view-components": patch
---

Only attach validation IDs to form elements that support validation
5 changes: 5 additions & 0 deletions .changeset/wise-coats-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openproject/primer-view-components': minor
---

Primer::Alpha::Dialog uses <dialog> internally
6 changes: 3 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [Choice] Ruby version: 3, 3.0, 2, 2.7, 2.6
ARG VARIANT="2.7"
FROM mcr.microsoft.com/vscode/devcontainers/ruby:0-${VARIANT}
ARG VARIANT="3"
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}

ARG INSTALL_NODE="true"
ARG NODE_VERSION="lts/*"
Expand Down Expand Up @@ -43,7 +43,7 @@ RUN if [ "${INSTALL_NODE}" = "true" ]; then su vscode -c "umask 0002 && . /usr/l

# Install gems
ARG BUNDLER_VERSION=2.2.11
RUN gem install bundler:${BUNDLER_VERSION} solargraph
RUN gem install bundler:${BUNDLER_VERSION} solargraph:'~> 0.50.0'

# Install chrome
RUN curl --silent --show-error --location --fail --retry 3 --output /tmp/google-chrome-stable_current_amd64.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "2.7",
"VARIANT": "3",
"INSTALL_NODE": "true",
"NODE_VERSION": "lts/*"
}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/demo-production-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
with:
ruby-version: '3.2'
bundler-cache: true
- uses: actions/[email protected].2
- uses: actions/[email protected].3
with:
path: demo/gemfiles/vendor/bundle
key: gems-build-kuby-main-ruby-3.2.x-${{ hashFiles('demo/gemfiles/kuby.gemfile.lock') }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get specific changed files
id: changed-files
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v42.0.0
with:
files: |
docs/**/*.md
Expand All @@ -39,7 +39,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get specific changed files
id: changed-files
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v42.0.0
with:
files: |
app/**/*.rb
Expand All @@ -62,7 +62,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v42.0.0
with:
files: |
app/components/**/*.erb
Expand All @@ -82,7 +82,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v42.0.0
with:
files: |
app/components/**/*.ts
Expand All @@ -103,7 +103,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41.0.0
uses: tj-actions/changed-files@v42.0.0
with:
files: |
app/components/**/*.pcss
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ end
# rubocop:enable Bundler/DuplicatedGem

# Use Puma as the app server
gem "puma", "~> 6.4.0"
gem "puma", "~> 6.4.2"
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem "webpacker", "~> 5.0"

Expand All @@ -50,7 +50,7 @@ group :test do
# Disallow v5.19 for now since it breaks mocha.
# See: https://github.com/freerange/mocha/issues/614
# Remove this line when mocha has fixed the issue
gem "minitest", "< 5.21"
gem "minitest", "< 5.22"
end

# development dependencies
Expand Down
12 changes: 6 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ GEM
parser (>= 2.4)
smart_properties
bigdecimal (3.1.4)
bootsnap (1.17.0)
bootsnap (1.17.1)
msgpack (~> 1.2)
builder (3.2.4)
capybara (3.39.2)
Expand Down Expand Up @@ -130,12 +130,12 @@ GEM
method_source (1.0.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.20.0)
minitest (5.21.1)
mocha (2.1.0)
ruby2_keywords (>= 0.0.5)
msgpack (1.7.2)
mutex_m (0.1.2)
nio4r (2.5.9)
nio4r (2.7.0)
nokogiri (1.15.4)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
Expand All @@ -152,7 +152,7 @@ GEM
psych (5.1.1.1)
stringio
public_suffix (5.0.3)
puma (6.4.0)
puma (6.4.2)
nio4r (~> 2.0)
racc (1.7.2)
rack (2.2.8)
Expand Down Expand Up @@ -293,11 +293,11 @@ DEPENDENCIES
listen (~> 3.0)
lookbook (~> 2.1.1)
matrix (~> 0.4.2)
minitest (< 5.21)
minitest (< 5.22)
mocha
openproject-primer_view_components!
pry
puma (~> 6.4.0)
puma (~> 6.4.2)
rack (~> 2.2)
rack-cors
railties (= 7.1.1)
Expand Down
4 changes: 3 additions & 1 deletion app/components/primer/alpha/action_menu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ def initialize(
#
# @param system_arguments [Hash] The arguments accepted by <%= link_to_component(Primer::Alpha::Overlay) %>'s `show_button` slot.
def with_show_button(**system_arguments, &block)
@overlay.with_show_button(**system_arguments, id: "#{@menu_id}-button", controls: "#{@menu_id}-list", &block)
@overlay.with_show_button(**system_arguments, id: "#{@menu_id}-button", controls: "#{@menu_id}-list") do |button|
evaluate_block(button, &block)
end
end

# @!parse
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,15 @@ export class ActionMenuElement extends HTMLElement {
if (this.#isOpen()) {
this.#hide()
}
const activeElement = this.ownerDocument.activeElement
const lostFocus = this.ownerDocument.activeElement === this.ownerDocument.body
const focusInClosedMenu = this.contains(activeElement)
if (lostFocus || focusInClosedMenu) {
setTimeout(() => this.invokerElement?.focus(), 0)
}
}
// a modal <dialog> element will close all popovers
setTimeout(() => this.#show(), 0)
dialog.addEventListener('close', handleDialogClose, {signal})
dialog.addEventListener('cancel', handleDialogClose, {signal})
}
Expand Down
10 changes: 7 additions & 3 deletions app/components/primer/alpha/banner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class Banner < Primer::Component
}
}

DEFAULT_TAG = :div
TAG_OPTIONS = [DEFAULT_TAG, :section].freeze

DEFAULT_SCHEME = :default
SCHEME_MAPPINGS = {
DEFAULT_SCHEME => "",
Expand Down Expand Up @@ -57,6 +60,7 @@ class Banner < Primer::Component

DEFAULT_DISMISS_LABEL = "Dismiss"

# @param tag [Symbol] <%= one_of(Primer::Alpha::Banner::TAG_OPTIONS) %>
# @param full [Boolean] Whether the component should take up the full width of the screen.
# @param full_when_narrow [Boolean] Whether the component should take up the full width of the screen when rendered inside smaller viewports.
# @param dismiss_scheme [Symbol] Whether the component can be dismissed with an "x" button. <%= one_of(Primer::Alpha::Banner::DISMISS_SCHEMES) %>
Expand All @@ -65,15 +69,15 @@ class Banner < Primer::Component
# @param icon [Symbol] The name of an <%= link_to_octicons %> icon to use. If no icon is provided, a default one will be chosen based on the scheme.
# @param scheme [Symbol] <%= one_of(Primer::Alpha::Banner::SCHEME_MAPPINGS.keys) %>
# @param system_arguments [Hash] <%= link_to_system_arguments_docs %>
def initialize(full: false, full_when_narrow: false, dismiss_scheme: DEFAULT_DISMISS_SCHEME, dismiss_label: DEFAULT_DISMISS_LABEL, description: nil, icon: nil, scheme: DEFAULT_SCHEME, **system_arguments)
def initialize(tag: DEFAULT_TAG, full: false, full_when_narrow: false, dismiss_scheme: DEFAULT_DISMISS_SCHEME, dismiss_label: DEFAULT_DISMISS_LABEL, description: nil, icon: nil, scheme: DEFAULT_SCHEME, **system_arguments)
@scheme = fetch_or_fallback(SCHEME_MAPPINGS.keys, scheme, DEFAULT_SCHEME)
@icon = icon || DEFAULT_ICONS[@scheme]
@dismiss_scheme = dismiss_scheme
@dismiss_label = dismiss_label
@description = description

@system_arguments = deny_tag_argument(**system_arguments)
@system_arguments[:tag] = :div
@system_arguments = system_arguments
@system_arguments[:tag] = fetch_or_fallback(TAG_OPTIONS, tag, DEFAULT_TAG)
@system_arguments[:classes] = class_names(
@system_arguments[:classes],
"Banner",
Expand Down
4 changes: 2 additions & 2 deletions app/components/primer/alpha/dialog.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<%= show_button %>
<div class="Overlay--hidden <%= @backdrop_classes %>" data-modal-dialog-overlay>
<dialog-helper>
<%= render Primer::BaseComponent.new(**@system_arguments) do %>
<%= header %>
<% if content.present? %>
Expand All @@ -11,4 +11,4 @@
<%= footer %>
<% end %>
<% end %>
</div>
</dialog-helper>
Loading
Loading