Skip to content

Commit

Permalink
Fix live release submission component overflowing texts
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Oct 15, 2024
1 parent b19cf8b commit 0f42011
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/components/v2/commit_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="flex flex-row gap-x-1 items-center">
<%= render V2::IconComponent.new("v2/git_commit_vertical.svg", size: :md) %>
<%= render(V2::ButtonComponent.new(scheme: :link,
label: message.truncate(77),
label: message.truncate(75),
options: url,
type: :link_external,
size: :none,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<%= render V2::IconComponent.new("v2/slash.svg", size: :md) %>
<% end %>

<%= render V2::BadgeComponent.new(text: submission.submission_channel.name, kind: :badge) do |badge| %>
<%= render V2::BadgeComponent.new(text: submission.submission_channel.name.truncate(20), kind: :badge) do |badge| %>
<% badge.with_icon("integrations/logo_#{submission.provider}.png") %>
<% end %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,21 @@

<% if active? %>
<%= render partial: "shared/show_time_ago",
locals: {tooltip_text: last_activity_tooltip, tooltip_placement: "bottom", last_activity_at:} %>
locals: { tooltip_text: last_activity_tooltip, tooltip_placement: "bottom", last_activity_at: } %>
<% end %>
</div>

<%= render partial: "shared/play_store_review_rejected", locals: {show: submission.failed_with_action_required?,
build:,
actionable: true,
channel_name: submission.submission_channel.name} %>
<%= render partial: "shared/play_store_review_rejected", locals: { show: submission.failed_with_action_required?,
build:,
actionable: true,
channel_name: submission.submission_channel.name } %>

<%= render V2::SectionComponent.new(title: "External info", style: :titled, size: :micro) do %>
<div class="flex">
<div class="flex flex-col gap-2">
<% if submission.conf.app_variant? %>
<div><%= render V2::BadgeComponent.new(text: submission.conf.integrable.bundle_identifier, kind: :badge) %></div>
<% end %>
<%= render V2::HorizontalDataSetComponent.new do |component| %>
<% component.with_data_set(title: "Bundle").with_content(submission.conf.integrable.bundle_identifier) %>
<% component.with_data_set(title: "Status").with_content(external_status) %>
<% component.with_data_set(title: "Tester groups").with_content(submission.submission_channel.name.truncate(50)) %>
<% if active? %>
Expand All @@ -55,7 +57,7 @@
<%= render V2::ButtonComponent.new(scheme: :naked_icon,
type: :link_external,
options: submission.store_link,
html_options: {class: "text-xs"},
html_options: { class: "text-xs" },
authz: false,
size: :none) do |b| %>
<% b.with_icon("v2/external_link.svg", size: :md) %>
Expand Down
4 changes: 4 additions & 0 deletions app/models/config/submission.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ def next
release_step_config.submissions.where("number > ?", number).order(:number).first
end

def app_variant?
integrable_type == "AppVariant"
end

def self.from_json(json)
submission = new(json.except("id", "release_step_config_id", "rollout_config", "submission_config"))
submission.submission_external = Config::SubmissionExternal.from_json(json["submission_config"])
Expand Down

0 comments on commit 0f42011

Please sign in to comment.