-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add save & continue editing button #635
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -306,7 +306,7 @@ defmodule Backpex.Fields.HasMany do | |
"" -> | ||
[] | ||
|
||
_ -> | ||
_other -> | ||
nil | ||
end | ||
end | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -130,6 +130,12 @@ defmodule Backpex.HTML.Layout do | |
:if={Phoenix.Flash.get(@flash, :info) && Phoenix.Flash.get(@flash, :info) != ""} | ||
class="alert bg-info text-info-content my-4 text-sm" | ||
phx-value-key="info" | ||
x-data="{ isVisible: false }" | ||
x-init="() => { isVisible = true; setTimeout(() => isVisible = false, 5000) }" | ||
x-show="isVisible" | ||
x-transition:leave="transition ease-in duration-2000" | ||
x-transition:leave-start="opacity-100 transform scale-100" | ||
x-transition:leave-end="opacity-0 transform scale-90" | ||
Comment on lines
+133
to
+138
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can this be done with JS commands? We would like to remove Alpine in the future, so we should prepare for it now and not add more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The best I can do is either this:
in the html in the flash_messages function(not pretty), since there is no assets with js I can't create a hook. Or something like this:
That removes the msg when a user is using the page again. But that will remove the msg immediately on click-away which might make it disappear to fast. |
||
> | ||
<Backpex.HTML.CoreComponents.icon name="hero-information-circle" class="h-5 w-5" /> | ||
<span> | ||
|
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.
We cannot do this as this will result in only adding the
Credo.Check.Consistency.UnusedVariableNames
check.Note that the log displays
1 check
only.The reason is that credo automatically adds all default checks if the
enabled
key is not defined. If its there, it will use the configured checks only.Instead of:
we can do this