-
Notifications
You must be signed in to change notification settings - Fork 0
[CLEAN] Synthetic Benchmark PR #5874 - Updated empty states across settings #87
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
base: base_pr_5874_20251204_6218
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||
User description
Benchmark PR plausible#5874
Type: Clean (correct implementation)
Original PR Title: Updated empty states across settings
Original PR Description: ### Changes
Tests
Dark mode
Original PR URL: Updated empty states across settings plausible/analytics#5874
PR Type
Enhancement, Tests
Description
Redesigned empty states across settings pages with center-aligned copy, documentation links, and call-to-action buttons
Enhanced empty state visibility by conditionally hiding setting subtitles when no content exists
Refactored component architecture to use
current_userparameter instead ofcurrent_rolefor improved context awarenessImplemented new
.tilecomponent wrapper with feature toggle support for goals, props, funnels, and imports/exports settingsAdded new
toggle_livecomponent for rendering feature toggles in LiveView contexts with state managementUpdated empty state messaging across multiple settings: sites, goals, properties, funnels, shields (IP, hostname, page, country rules), shared links, API keys, and plugin tokens
Implemented conditional filter bar rendering that only displays when searching or content exists
Extracted empty state and search result components into separate, reusable modules
Updated comprehensive test coverage for all modified settings pages and components with new empty state assertions
Diagram Walkthrough
File Walkthrough
12 files
site_controller_test.exs
Enhanced empty state test coverage for sitestest/plausible_web/controllers/site_controller_test.exs
assertions for personal vs team sites
sites, and search results
your first personal site" and "Add your first team site"
to "Try a different search term"
props_settings_test.exs
Updated props settings tests for new empty statetest/plausible_web/live/props_settings_test.exs
custom property" instead of old message
render
notice_test.exs
Updated billing notice tests to use current_user parametertest/plausible_web/components/billing/notice_test.exs
current_roletocurrent_userin all test casesgoal_settings_test.exs
Updated goal settings tests for new empty state messagingtest/plausible_web/live/goal_settings_test.exs
first goal"
billing_test.exs
Updated billing component tests to use current_user parametertest/plausible_web/components/billing/billing_test.exs
current_roletocurrent_userin all test casesfunnel_settings_test.exs
Updated funnel settings tests for new empty state and toggletest/plausible_web/live/funnel_settings_test.exs
setup_funnelsinstead ofsetup_goalsfor searchinput test
few goals"
sites_test.exs
Updated sites list tests for new empty state messagingtest/plausible_web/live/sites_test.exs
your first personal site"
your team"
hostnames_test.exs
Updated hostname shields tests for new empty state messagingtest/plausible_web/live/shields/hostnames_test.exs
hostname"
recording
ip_addresses_test.exs
Updated IP shields tests for new empty state messagingtest/plausible_web/live/shields/ip_addresses_test.exs
address"
countries_test.exs
Updated country shields tests for new empty state messagingtest/plausible_web/live/shields/countries_test.exs
country"
pages_test.exs
Updated page shields tests for new empty state messagingtest/plausible_web/live/shields/pages_test.exs
shared_link_settings_test.exs
Updated shared link settings tests for new empty state messagingtest/plausible_web/live/shared_link_settings_test.exs
first shared link"
24 files
imports_exports_settings.ex
Redesigned imports empty state with tile wrapperlib/plausible_web/live/imports_exports_settings.ex
.tilecomponent with proper documentationand feature handling
CTA buttons when no imports exist
whether imports exist
your first data"
ip_rules.ex
Implemented centered empty state for IP ruleslib/plausible_web/live/shields/ip_rules.ex
when no rules exist
with documentation link
rules exist
hostname_rules.ex
Implemented centered empty state for hostname ruleslib/plausible_web/live/shields/hostname_rules.ex
CTA button
state
documentation link
page_rules.ex
Implemented centered empty state for page ruleslib/plausible_web/live/shields/page_rules.ex
action button
state
link
sites.ex
Enhanced sites list with dynamic empty state handlinglib/plausible_web/live/sites.ex
is_empty_state?,empty_state_title, andempty_state_descriptionbased on team setup and site availabilitysearching?assignment to track when filter text is activedescription, and action buttons
sites" button based on context
shared_link_settings.ex
Redesigned shared links empty state with tile wrapperlib/plausible_web/live/shared_link_settings.ex
.tilecomponent with feature gating"Create your first shared link"
country_rules.ex
Implemented centered empty state for country ruleslib/plausible_web/live/shields/country_rules.ex
action button
exist
state
link
goal_settings.ex
Refactored goal settings with tile wrapper and feature togglelib/plausible_web/live/goal_settings.ex
site_roleassignment logic and replaced with directcurrent_userusage.tilecomponent with feature toggle andgating
handling
funnel_settings.ex
Refactored funnel settings with tile wrapper and feature toggleextra/lib/plausible_web/live/funnel_settings.ex
.tilecomponent with feature toggle andgating
goals are insufficient
handle_infocallback to handle feature toggle messageslist.ex
Implemented conditional filter bar and enhanced empty state for goalslib/plausible_web/live/goal_settings/list.ex
searching?assignment to track active filter textdocumentation link
list.ex
Implemented conditional filter bar and enhanced empty state forpropertieslib/plausible_web/live/props_settings/list.ex
searching?assignment to track active filter textdocumentation link
list.ex
Implemented conditional filter bar and enhanced empty state forfunnelsextra/lib/plausible_web/live/funnel_settings/list.ex
searching?assignment to track active filter textdocumentation link
form.ex
Refactored goal form to use current_user instead of site_rolelib/plausible_web/live/goal_settings/form.ex
site_roleattribute and replaced withcurrent_userthroughoutcurrent_userinstead ofsite_rolecurrent_userparametergeneric.ex
Updated tile component with current_user and show_content attributeslib/plausible_web/components/generic.ex
current_roleattribute tocurrent_userin tile componentshow_content?attribute to conditionally hide content sectionscurrent_userinstead ofcurrent_rolehighlightedcomponent for styling emphasized texttoggle_live.ex
New feature toggle live component for dashboard visibilitylib/plausible_web/components/site/toggle_live.ex
billing.ex
Refactored billing component to use current_user parameterlib/plausible_web/components/billing/billing.ex
current_roleattribute tocurrent_userin feature_gatecomponent
siteattribute to feature_gate for site-specific role resolutionupgrade_call_to_actionto derive role from user and team/sitecontext
props_settings.ex
Refactored props settings with tile wrapper and feature togglelib/plausible_web/live/props_settings.ex
.tilecomponent with feature toggle andgating
handling
handle_infocallback to handle feature toggle messagessettings.ex
Implemented centered empty state for plugin tokenslib/plausible_web/live/plugins/api/settings.ex
CTA button
exist
notice.ex
Updated billing notice component to use current_user parameterlib/plausible_web/components/billing/notice.ex
current_roleattribute tocurrent_userin limit_exceededcomponent
current_userto upgrade_call_to_actionteam_setup.ex
Updated team setup to use current_user parameterlib/plausible_web/live/team_setup.ex
current_roleparameter tocurrent_userin feature_gatecomponent call
team_management.ex
Updated team management to use current_user parameterlib/plausible_web/live/team_management.ex
current_roleparameter tocurrent_userin limit_exceededcomponent call
api_keys.html.heex
Implemented centered empty state for API keyslib/plausible_web/templates/settings/api_keys.html.heex
CTA button
exist
settings_visibility.html.heex
Refactored shared links template structurelib/plausible_web/templates/site/settings_visibility.html.heex
outside
current_roletocurrent_userin embed dashboard tilesettings_goals.html.heex
Moved goal settings tile wrapper to live componentlib/plausible_web/templates/site/settings_goals.html.heex
10 files