Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into TRAB-690
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Jan 24, 2025
2 parents 8fca050 + 632781e commit 02fd277
Show file tree
Hide file tree
Showing 508 changed files with 3,363 additions and 2,534 deletions.
1 change: 1 addition & 0 deletions .irbrc
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ def Wrun(id) = WorkflowRun.find(id)
def B(id) = Build.find(id)
def Prun(id) = ReleasePlatformRun(id)
def Csha(sha) = Commit.all.find { |c| c.short_sha == sha }
def U(email) = Accounts::User.find_by_unique_authn_id(email)
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ GEM
bindex (0.8.1)
bootsnap (1.18.4)
msgpack (~> 1.2)
brakeman (6.2.2)
brakeman (7.0.0)
racc
bugsnag-api (3.0.0)
sawyer (~> 0.9.2)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<a href="https://twitter.com/tramlinehq/" target="_blank" rel="noopener noreferrer">
<img alt="Twitter Follow" src="https://img.shields.io/twitter/follow/tramlinehq?style=social">
</a>
<a href="https://discord.gg/u7VwyvBV2Z" target="_blank" rel="noopener noreferrer">
<a href="https://go.tramline.app/discord" target="_blank" rel="noopener noreferrer">
<img alt="Discord" src="https://img.shields.io/discord/974284993641725962?style=plastic">
</a>

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
12 changes: 3 additions & 9 deletions app/assets/images/android.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
13 changes: 7 additions & 6 deletions app/assets/images/clipboard_copy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
4 changes: 2 additions & 2 deletions app/assets/images/clock.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
7 changes: 6 additions & 1 deletion app/assets/images/download.svg
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
7 changes: 6 additions & 1 deletion app/assets/images/git_commit.svg
File renamed without changes
12 changes: 7 additions & 5 deletions app/assets/images/git_pull_request.svg
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
7 changes: 4 additions & 3 deletions app/assets/images/play.svg
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
4 changes: 0 additions & 4 deletions app/assets/images/v2/android.svg
Diff not rendered.
8 changes: 0 additions & 8 deletions app/assets/images/v2/clipboard_copy.svg
Diff not rendered.
3 changes: 0 additions & 3 deletions app/assets/images/v2/clock.svg
Diff not rendered.
6 changes: 0 additions & 6 deletions app/assets/images/v2/download.svg
Diff not rendered.
6 changes: 0 additions & 6 deletions app/assets/images/v2/git_commit.svg
Diff not rendered.
5 changes: 0 additions & 5 deletions app/assets/images/v2/play.svg
Diff not rendered.
1 change: 0 additions & 1 deletion app/assets/images/v2/plus.svg
Diff not rendered.
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<div class="group transform flex w-full <%= title_style %>" data-action="click->reveal#toggle">
<div class="flex items-center w-full gap-2 text-secondary focus:ring-4 focus:ring-main-200 dark:focus:ring-main dark:text-secondary-50">
<span data-accordion-reveal <%= "hidden" unless auto_hide %>>
<%= inline_svg("v2/plus.svg", classname: "w-4 h-4 fill-current") %>
<%= inline_svg("plus.svg", classname: "w-3 h-3 fill-current") %>
</span>

<span data-accordion-reveal <%= "hidden" if auto_hide %>>
<%= inline_svg("v2/plus.svg", classname: "w-4 h-4 fill-current rotate-45") %>
<%= inline_svg("plus.svg", classname: "w-3 h-3 fill-current rotate-45") %>
</span>

<span class="select-none flex-grow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

class V2::AccordionComponent < V2::BaseComponent
class AccordionComponent < BaseComponent
renders_one :title_section

def initialize(title: nil, auto_hide: true, push_down: false, acts_as_list: false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
role="alert">
<div class="flex mr-6 gap-x-1 items-start">
<div class="flex justify-start gap-x-1 items-center">
<%= render V2::IconComponent.new("v2/info.svg", size: :md) %>
<%= render IconComponent.new("info.svg", size: :md) %>
<span class="font-semibold"><%= type.to_s.humanize %>:</span>
</div>
<%= title %>
<div class="flex flex-wrap gap-1 items-start"><%= title %></div>
</div>

<% if dismissible %>
<%= render V2::ButtonComponent.new(
<%= render ButtonComponent.new(
scheme: :naked_icon,
type: :action,
size: :none,
Expand All @@ -27,7 +27,7 @@
class="w-full <%= padding %> <%= style %> <%= border_style %> mb-4"
role="alert">
<div class="flex items-center">
<%= render V2::IconComponent.new("v2/info.svg", size: :md, classes: "mr-2") %>
<%= render IconComponent.new("info.svg", size: :md, classes: "mr-2") %>
<h3 class="heading-3 !text-inherit"><%= title %></h3>
</div>

Expand All @@ -38,20 +38,20 @@
<% if info? || dismissible %>
<div class="flex mt-4 gap-x-2">
<% if info? %>
<%= render V2::ButtonComponent.new(
<%= render ButtonComponent.new(
scheme: :none,
options: info[:link],
type: :link_external,
label: info[:label],
size: :none,
authz: false,
html_options: { class: ACTION_BUTTON_STYLES }) do |b|
b.with_icon("v2/eye.svg", size: :md, rounded: false)
b.with_icon("eye.svg", size: :md, rounded: false)
end %>
<% end %>

<% if dismissible %>
<%= render V2::ButtonComponent.new(
<%= render ButtonComponent.new(
scheme: :none,
type: :action,
size: :none,
Expand All @@ -66,7 +66,7 @@
<% elsif announcement? %>
<div class="w-full <%= padding %> <%= style %> <%= border_style %>">
<div class="flex items-center mb-2">
<%= render V2::IconComponent.new("v2/megaphone.svg", size: :lg, classes: "mr-2") %>
<%= render IconComponent.new("megaphone.svg", size: :lg, classes: "mr-2") %>
<h3 class="heading-3 !text-inherit"><%= title %></h3>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class V2::AlertComponent < V2::BaseComponent
class AlertComponent < BaseComponent
COLORS = {
notice: "text-blue-900 bg-blue-50 dark:bg-main-800 dark:text-blue-400",
error: "text-red-800 bg-red-50 dark:bg-main-800 dark:text-red-400",
Expand All @@ -21,9 +21,9 @@ class V2::AlertComponent < V2::BaseComponent

KINDS = [:alert, :banner, :announcement]

renders_one :banner_action, V2::ButtonComponent
renders_many :announcement_modals, V2::ModalComponent
renders_many :announcement_buttons, V2::ButtonComponent
renders_one :banner_action, ButtonComponent
renders_many :announcement_modals, ModalComponent
renders_many :announcement_buttons, ButtonComponent

def initialize(kind: :alert, type: :notice, title: "Alert", dismissible: false, info: nil, full_screen: true)
raise ArgumentError, "Invalid type" unless COLORS.key?(type.to_sym)
Expand Down
4 changes: 2 additions & 2 deletions app/components/all_builds_table_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@
<span>
<% if build.ci_link.present? %>
<%= link_to_external build.ci_link, title: "link to CI" do %>
<%= render V2::IconComponent.new("workflow.svg", size: :lg) %>
<%= render IconComponent.new("workflow.svg", size: :lg) %>
<% end %>
<% end %>

<% if build.download_url.present? %>
<%= link_to_external build.download_url, title: "download build" do %>
<%= render V2::IconComponent.new("download.svg", size: :lg) %>
<%= render IconComponent.new("download.svg", size: :lg) %>
<% end %>
<% end %>
</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<%= render V2::ButtonComponent.new(scheme: :light,
<%= render ButtonComponent.new(scheme: :light,
options: path,
type: :link,
size: :xxs,
authz: false,
html_options: { class: "-ml-0.5",
data: link_data }) do |b| %>
<% b.with_tooltip(tooltip_text, placement: "right") %>
<% b.with_icon("v2/arrow_left.svg", size: :md) %>
<% b.with_icon("arrow_left.svg", size: :md) %>
<% end %>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class V2::BackButtonComponent < V2::BaseComponent
class BackButtonComponent < BaseComponent
def initialize(path: nil, to: nil)
@path = path
@link_data = (!path) ? history_nav : {}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class V2::BadgeComponent < V2::BaseComponent
renders_one :icon, V2::IconComponent
class BadgeComponent < BaseComponent
renders_one :icon, IconComponent
renders_one :link, ->(label, link) do
link_to_external(label, link, class: "hover:underline")
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class V2::BaseComponent < ViewComponent::Base
class BaseComponent < ViewComponent::Base
include ApplicationHelper
include LinkHelper
include AssetsHelper
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# frozen_string_literal: true

class V2::BuildHealthComponent < ViewComponent::Base
def initialize(release_platform_run:, builds:)
@release_platform_run = release_platform_run
class BuildHealthComponent < ViewComponent::Base
def initialize(builds)
@builds = builds
end

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class V2::ButtonComponent < V2::BaseComponent
class ButtonComponent < BaseComponent
include Memery

TYPES = %i[link link_external button dropdown action]
Expand Down Expand Up @@ -37,8 +37,8 @@ class V2::ButtonComponent < V2::BaseComponent
}

renders_one :title_text
renders_one :icon, V2::IconComponent
renders_one :tooltip, ->(text, **args) { V2::TooltipComponent.new(text, **args.merge(cursor: false)) }
renders_one :icon, IconComponent
renders_one :tooltip, ->(text, **args) { TooltipComponent.new(text, **args.merge(cursor: false)) }

def initialize(label: nil, scheme: :switcher, type: :button, size: :xxs, options: nil, html_options: nil, arrow: :none, authz: true, turbo: true, disabled: false, auto_label_case: true)
arrow = (scheme == :switcher) ? :double : arrow
Expand Down Expand Up @@ -173,6 +173,6 @@ def icon_only?

memoize def arrow
return if @arrow_type.eql?(:none)
V2::IconComponent.new(DROPDOWN_ARROW_STYLES[@arrow_type], size: :sm, classes: "ml-2")
IconComponent.new(DROPDOWN_ARROW_STYLES[@arrow_type], size: :sm, classes: "ml-2")
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
<div class="flex flex-row items-center justify-between">
<div class="flex items-center">
<% if fold? && !emptiness %>
<%= render V2::ButtonComponent.new(
<%= render ButtonComponent.new(
scheme: :naked_icon,
type: :action,
authz: false,
html_options: fold_button_params,
size: :none) do |b|
b.with_icon("v2/unfold_vertical.svg", size: :sm)
b.with_icon("unfold_vertical.svg", size: :sm)
b.with_tooltip("Fold / unfold", placement: "top")
end %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class V2::CardComponent < ViewComponent::Base
class CardComponent < ViewComponent::Base
renders_many :actions
renders_one :empty_state, ->(**args) {
empty_state_params = {type: :tiny}.merge(**args)
V2::EmptyStateComponent.new(**empty_state_params)
EmptyStateComponent.new(**empty_state_params)
}

SIZE = {
Expand Down
4 changes: 2 additions & 2 deletions app/components/chart_component.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<% if chart.present? %>
<%= render V2::CardComponent.new(title: title,
<%= render CardComponent.new(title: title,
subtitle: chart_scope,
fold: false,
separator: false,
Expand All @@ -12,7 +12,7 @@
<% end %>

<% card.with_empty_state(text: "Waiting for more data",
banner_image: "v2/clock.svg",
banner_image: "clock.svg",
type: :subdued) %>

<% unless insufficient? %>
Expand Down
Loading

0 comments on commit 02fd277

Please sign in to comment.