-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Updated empty states across settings #5874
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9ccce04
Updated empty states across settings
sanne-san 779dd92
Fix funnels and props functionality not hiding when toggled off
sanne-san 39d7dbd
Update personal sites empty state
sanne-san 7f68d17
Make `tile` component lv-embeddable (#5891)
aerosol beefacd
Use new tile component for funnels, goals, imports and custom properties
sanne-san 5d7fa4f
Add empty states for team sites and simplify empty state logic
sanne-san 7ecdb87
Clean up:
aerosol a589d78
Merge branch 'master' into sanne-empty-states
aerosol 5d9e42f
Fixup
aerosol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -485,10 +485,11 @@ defmodule PlausibleWeb.Components.Generic do | |
| slot :subtitle, required: false | ||
| attr :feature_mod, :atom, default: nil | ||
| attr :feature_toggle?, :boolean, default: false | ||
| attr :current_role, :atom, default: nil | ||
| attr :current_team, :any, default: nil | ||
| attr :site, :any | ||
| attr :conn, :any | ||
| attr :current_user, :any, default: nil | ||
| attr :site, :any, default: nil | ||
| attr :conn, :any, default: nil | ||
| attr :show_content?, :boolean, default: true | ||
|
|
||
| def tile(assigns) do | ||
| ~H""" | ||
|
|
@@ -502,20 +503,24 @@ defmodule PlausibleWeb.Components.Generic do | |
| <div :if={@subtitle != []} class="text-sm mt-px text-gray-500 dark:text-gray-400 leading-5"> | ||
| {render_slot(@subtitle)} | ||
| </div> | ||
| <PlausibleWeb.Components.Site.Feature.toggle | ||
|
|
||
| <.live_component | ||
| :if={@feature_toggle?} | ||
| feature_mod={@feature_mod} | ||
| module={PlausibleWeb.Components.Site.Feature.ToggleLive} | ||
| id={"feature-toggle-#{@site.id}-#{@feature_mod}"} | ||
| site={@site} | ||
| conn={@conn} | ||
| feature_mod={@feature_mod} | ||
| current_user={@current_user} | ||
| /> | ||
| </header> | ||
| <div class="border-b dark:border-gray-700 mx-6"></div> | ||
| <div class="relative"> | ||
| <div class={["border-b dark:border-gray-700 mx-6", if(not @show_content?, do: "hidden")]}></div> | ||
| <div class={["relative", if(not @show_content?, do: "hidden")]}> | ||
|
Comment on lines
+516
to
+517
Contributor
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. Nice! 👌 |
||
| <%= if @feature_mod do %> | ||
| <PlausibleWeb.Components.Billing.feature_gate | ||
| locked?={@feature_mod.check_availability(@current_team) != :ok} | ||
| current_role={@current_role} | ||
| current_user={@current_user} | ||
| current_team={@current_team} | ||
| site={@site} | ||
| > | ||
| <div class="p-6 pb-14"> | ||
| {render_slot(@inner_block)} | ||
|
|
@@ -1125,6 +1130,16 @@ defmodule PlausibleWeb.Components.Generic do | |
| """ | ||
| end | ||
|
|
||
| slot :inner_block, required: true | ||
|
|
||
| def highlighted(assigns) do | ||
| ~H""" | ||
| <span class="font-medium text-indigo-600 dark:text-gray-100"> | ||
| {render_slot(@inner_block)} | ||
| </span> | ||
| """ | ||
| end | ||
|
|
||
| def settings_badge(%{type: :new} = assigns) do | ||
| ~H""" | ||
| <span class="inline-block ml-2 bg-indigo-100 text-indigo-600 text-xs font-semibold py-1 px-2 rounded-md"> | ||
|
|
||
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What's this
idused for? I'm seeing another id attribute defined by theToggleLivecomponent itself (the wrapper div):Should we stick to a single one?
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.
Tests. I guess we prefer data-test-id?