-
Notifications
You must be signed in to change notification settings - Fork 47
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
Update flash message to contain link to github actions after save & sync #3038
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3038 +/- ##
==========================================
+ Coverage 91.69% 91.72% +0.02%
==========================================
Files 349 350 +1
Lines 12975 12988 +13
==========================================
+ Hits 11898 11913 +15
+ Misses 1077 1075 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Okay, so I have introduced |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@midigofrank my man, I loved every piece in here. Nice job man 👏🏽 🔥
@@ -402,16 +415,20 @@ defmodule LightningWeb.Components.Common do | |||
phx-hook="Flash" | |||
> | |||
<div class="flex justify-between items-center space-x-3 text-red-900"> | |||
<Heroicons.exclamation_circle solid class="w-5 h-5" /> | |||
<.icon name="hero-exclamation-circle-solid" class="w-5 h-5" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice ❤️
defmodule LightningWeb.DynamicComponent do | ||
@moduledoc """ | ||
Provides a type to be used in assigns to denote a dynamic component | ||
""" | ||
@type t() :: %LightningWeb.DynamicComponent{function: fun(), args: map()} | ||
@enforce_keys [:function, :args] | ||
defstruct [:function, :args] | ||
|
||
@doc "Checks whether the given value can be rendered as a dynamic component" | ||
@spec is_dynamic_component?(any()) :: boolean() | ||
def is_dynamic_component?(val) do | ||
is_struct(val, __MODULE__) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing 🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good @midigofrank, just need to fix up the tests - assuming it's not flaky.
|
||
assert has_element?( | ||
view, | ||
~s{#flash [href="#{link_to_actions}"][target="_blank"]}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is failing, perhaps because we don't have a #flash
element anymore, since the unique ids changes we use this to find flash messages: [data-flash-kind='info']
.
Hey @stuartc , I have fixed the failing test. It was because we no longer have a |
Description
This PR updates flash message to contain link to github actions after save & sync
Closes #2989
Validation steps
You need to have github sync setup for your project in order to test this locally
ctrl-shift-s
orcommand-shift-s
if you're using mac. PressSave and Sync
in the modal that pops up.Additional notes for the reviewer
I have made the
flash
message to be either a text, or a map with:function and :attrs
keys.I think we should have a type for dynamic components. I wanted to name my key
:assigns
instead of:attrs
but I chose to stick with:attrs
because it's already being used to display the:banner
.Something like:
AI Usage
Please disclose how you've used AI in this work (it's cool, we just want to know!):
You can read more details in our Responsible AI Policy
Pre-submission checklist
:owner
,:admin
,:editor
,:viewer
)