Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ GEM
argon2-kdf (>= 1)
bootsnap (1.25.0)
msgpack (~> 1.5)
brakeman (8.0.6)
brakeman (8.1.0)
racc
browser (6.2.0)
builder (3.3.0)
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
@use "components/vega_sprite";
@use "components/visual_novel";
@use "components/buku_x3_reveal";
@use "components/rocket_progress";

// Pages
@use "pages/onboarding" as onboarding_pages;
Expand Down
8 changes: 5 additions & 3 deletions app/assets/stylesheets/components/_buku_x3_status.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.buku-x3-status {
--buku-team-color: var(--color-set-1-fg-secondary);

position: relative;
display: grid;
align-items: center;
Expand Down Expand Up @@ -63,8 +65,8 @@
}
}

&[data-role-open],
&:has(&__toggle:focus-visible) {
&--interactive[data-role-open],
&--interactive:has(.buku-x3-status__toggle:focus-visible) {
.buku-x3-status__identity {
visibility: visible;
opacity: 1;
Expand All @@ -76,7 +78,7 @@
}

@media (hover: hover) {
&:not(&--compact):hover {
&--interactive:hover {
.buku-x3-status__identity {
visibility: visible;
opacity: 1;
Expand Down
221 changes: 0 additions & 221 deletions app/assets/stylesheets/components/_rocket_progress.scss

This file was deleted.

18 changes: 10 additions & 8 deletions app/components/buku_x3_status_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
<section class="buku-x3-status <%= 'buku-x3-status--compact' if compact? %> buku-x3-status--<%= buku? ? 'buku' : 'bean' %>"
<section class="buku-x3-status <%= 'buku-x3-status--compact' if compact? %> <%= "buku-x3-status--#{buku? ? 'buku' : 'bean'}" if role_visible? %> <%= 'buku-x3-status--interactive' if role_visible? && !compact? %>"
aria-label="<%= compact? ? 'your private event role' : 'bukus versus beans' %>"
data-controller="buku-x3-status"
data-buku-x3-status-live-hours-value="<%= (compact? ? {} : team_hours).to_json %>"
data-action="blackhole:progress@window->buku-x3-status#update">
<% unless compact? %>
<% if role_visible? && !compact? %>
<button type="button" class="buku-x3-status__toggle" aria-label="show your event role" aria-pressed="false"
data-buku-x3-status-target="toggle"
data-action="click->buku-x3-status#toggleRole keydown.esc->buku-x3-status#dismissRole"></button>
<% end %>
<div class="buku-x3-status__identity">
<%= image_tag icon, class: "buku-x3-status__icon", alt: "", width: 120, height: 132 %>
<div>
<p class="buku-x3-status__role">you're a <strong><%= role_name %></strong></p>
<p class="buku-x3-status__reminder"><%= reminder %></p>
<% if role_visible? %>
<div class="buku-x3-status__identity">
<%= image_tag icon, class: "buku-x3-status__icon", alt: "", width: 120, height: 132 %>
<div>
<p class="buku-x3-status__role">you're a <strong><%= role_name %></strong></p>
<p class="buku-x3-status__reminder"><%= reminder %></p>
</div>
</div>
</div>
<% end %>
<% unless compact? %>
<div class="buku-x3-status__damage">
<div class="buku-x3-status__tug">
Expand Down
8 changes: 6 additions & 2 deletions app/components/buku_x3_status_component.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

# Private role reminder. Call sites pass the signed-in viewer, never a profile
# or project owner; do not cache this fragment across users.
# Public team progress with an optional private role reminder. Call sites pass
# the viewer, never a profile/project owner; do not cache across users.
class BukuX3StatusComponent < ViewComponent::Base
def initialize(user:, compact: false, preview: false, preview_role: "buku")
@user = user
Expand All @@ -11,6 +11,10 @@ def initialize(user:, compact: false, preview: false, preview_role: "buku")
end

def render?
!compact? || role_visible?
end

def role_visible?
return true if preview?

@user.present? && @user.onboarded? && Flipper.enabled?(:bukux3, @user) &&
Expand Down
39 changes: 0 additions & 39 deletions app/components/rocket_progress_component.html.erb

This file was deleted.

Loading
Loading