Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Openverse documentation
Light Logo Dark Logo
  • Django API
    • Guides
      • API quickstart guide
      • Testing guide
      • API Documentation Guidelines
      • API debugging guidelines
      • Debugging Database Queries
    • Reference
      • Made with Openverse
      • Search Algorithm
      • Authentication and Throttling
      • Django Healthcheck
  • Automations
    • Guides
      • Quickstart Guide
    • Reference
      • Python Scripts
      • Project Automations
  • Airflow Catalog
    • Guides
      • Catalog quickstart guide
      • Openverse Providers
      • Running DAGs locally
    • Reference
      • DAGs
  • Changelogs
    • API changelogs
      • 2025.04.11.13.47.14
      • 2025.03.10.04.14.33
      • 2025.02.05.11.12.38
      • 2025.01.24.17.16.29
      • 2025.01.15.17.59.21
      • 2025.01.14.14.57.35
      • 2025.01.12.10.55.21
      • 2025.01.11.11.22.59
      • 2024.12.27.21.22.28
      • 2024.12.20.09.55.14
      • 2024.12.16.15.25.57
      • 2024.12.11.14.44.17
      • 2024.12.07.04.18.28
      • 2024.12.02.20.27.17
      • 2024.11.28.17.33.15
      • 2024.11.25.17.45.37
      • 2024.11.18.15.59.41
      • 2024.11.17.18.36.17
      • 2024.11.08.08.05.37
      • 2024.11.04.06.41.58
      • 2024.10.21.09.19.16
      • 2024.10.14.15.38.39
      • 2024.09.16.09.52.36
      • 2024.09.09.05.40.22
      • 2024.09.06.08.57.05
      • 2024.08.16.21.27.09
      • 2024.08.14.16.29.10
      • 2024.08.14.10.34.40
      • 2024.08.12.17.31.11
      • 2024.08.05.16.42.20
      • 2024.07.30.17.36.41
      • 2024.07.23.07.16.35
      • 2024.07.20.10.58.11
      • 2024.07.15.03.59.12
      • 2024.07.01.20.35.48
      • 2024.06.24.18.01.42
      • 2024.06.17.15.33.56
      • 2024.06.07.17.19.06
      • 2024.06.03.15.35.02
      • 2024.05.28.21.25.54
      • 2024.05.27.15.21.38
      • 2024.05.23.15.02.00
      • 2024.05.20.15.14.53
      • 2024.05.13.15.19.42
      • 2024.05.07.23.56.36
      • 2024.05.06.19.44.35
      • 2024.05.01.13.59.00
      • 2024.04.22.15.11.09
      • 2024.04.15.17.18.29
      • 2024.04.09.03.50.11
      • 2024.04.02.05.06.52
      • 2024.04.01.17.07.10
      • 2024.03.25.15.22.26
      • 2024.03.18.15.51.25
      • 2024.03.13.17.10.22
      • 2024.03.11.15.26.16
      • 2024.03.04.15.15.13
      • 2024.02.28.16.32.28
      • 2024.02.20.22.54.08
      • 2024.02.13.05.45.50
      • 2024.02.05.20.34.01
      • 2024.01.29.19.36.26
      • 2024.01.16.17.28.14
      • 2024.01.08.20.06.53
      • 2024.01.01.19.52.14
      • 2023.12.26.05.11.22
      • 2023.12.18.17.56.24
      • 2023.12.11.19.20.45
      • 2023.12.04.19.51.23
      • 2023.11.29.22.20.31
      • 2023.11.27.05.10.48
      • 2023.11.20.09.32.25
      • 2023.11.14.23.44.01
      • 2023.11.13.22.18.21
      • 2023.11.01.21.27.09
      • 2023.10.30.16.26.21
      • 2023.10.23.11.40.59
      • 2023.10.18.15.25.27
      • 2023.10.11.04.49.20
      • 2023.10.10.21.08.33
      • 2023.10.10.18.42.39
      • 2023.10.06.17.13.36
      • 2023.09.30.00.15.32
      • 2023.09.28.00.26.34
      • 2023.09.25.21.34.44
      • 2023.09.20.11.16.51
      • 2023.09.20.07.37.52
      • 2023.09.19.08.13.24
      • 2023.09.15.19.15.58
      • 2023.09.11.16.56.52
      • 2023.09.04.19.52.19
      • 2023.08.28.20.43.01
      • 2023.08.22.04.57.04
      • 2023.08.14.16.35.15
      • 2023.08.08.22.22.02
      • 2023.07.24.20.47.04
      • 2023.07.17.21.05.23
      • 2023.07.10.08.44.19
      • 2023.07.03.17.52.00
      • 2023.06.28.19.49.58
      • 2023.06.28.02.17.04
      • 2023.06.26.20.33.46
      • 2023.06.19.17.48.39
      • 2023.06.13.00.21.51
      • 2023.06.05.15.04.02
      • 2023.06.01.01.50.43
      • 2023.05.30.17.57.04
      • 2023.05.30.12.02.04
      • 2023.05.19.22.08.07
      • 2023.05.19.18.58.25
      • 2023.05.19.17.16.50
      • 2023.05.15.21.51.49
      • 2023.05.02.21.26.28
      • 2023.04.27.07.29.23
      • 2023.04.23.23.22.14
      • 2023.04.19.00.01.39
      • 2023.04.18.15.27.15
      • 2023.04.12.23.29.59
    • Catalog changelogs
      • 2025.01.07.04.34.46
      • 2024.11.19.16.03.49
      • 2024.10.17.13.59.15
      • 2024.09.09.23.00.57
      • 2024.09.04.19.31.19
      • 2024.08.22.20.53.01
      • 2024.08.15.16.49.58
      • 2024.07.19.17.07.23
      • 2024.06.17.15.33.56
      • 2024.04.18.23.30.21
      • 2024.03.22.17.45.11
      • 2024.03.06.16.40.36
      • 2024.01.25.17.42.59
      • 2024.01.04.20.39.50
      • 2023.12.20.22.19.13
      • 2023.11.29.15.35.59
      • 2023.11.14.18.24.16
      • 2023.10.06.18.29.33
      • 2023.08.30.17.30.22
      • 2023.07.20.15.07.11
      • 2023.06.19.17.21.41
      • 2023.06.08.16.52.36
      • 2023.05.16.22.14.49
      • 2023.04.27.02.43.13
    • Frontend changelogs
      • 2025.07.03.14.31.53
      • 2025.05.26.14.11.17
      • 2025.04.11.13.47.15
      • 2025.02.05.11.32.04
      • 2025.01.24.17.16.28
      • 2025.01.16.15.54.08
      • 2024.12.27.21.22.28
      • 2024.12.19.05.42.40
      • 2024.12.19.03.36.42
      • 2024.12.17.14.37.03
      • 2024.12.16.15.26.01
      • 2024.12.10.14.47.56
      • 2024.12.07.04.18.28
      • 2024.12.02.17.23.30
      • 2024.11.08.08.05.38
      • 2024.11.04.06.42.01
      • 2024.10.28.15.42.58
      • 2024.10.24.04.16.14
      • 2024.10.19.14.45.06
      • 2024.10.14.15.38.39
      • 2024.09.25.05.33.23
      • 2024.09.16.09.52.36
      • 2024.09.09.05.40.19
      • 2024.09.05.07.51.39
      • 2024.09.04.18.01.14
      • 2024.09.01.19.19.29
      • 2024.08.26.14.55.41
      • 2024.08.16.21.27.06
      • 2024.08.12.10.29.09
      • 2024.08.06.13.48.44
      • 2024.07.30.16.33.18
      • 2024.07.30.12.38.56
      • 2024.07.26.14.38.19
      • 2024.07.20.10.58.11
      • 2024.07.15.03.59.13
      • 2024.07.01.20.35.48
      • 2024.06.26.17.18.17
      • 2024.06.24.18.01.44
      • 2024.06.17.15.33.55
      • 2024.06.07.17.19.06
      • 2024.06.03.15.35.03
      • 2024.05.27.15.21.40
      • 2024.05.20.15.14.53
      • 2024.05.13.17.18.44
      • 2024.05.07.16.44.22
      • 2024.04.25.15.32.08
      • 2024.04.24.12.19.32
      • 2024.04.22.15.11.07
      • 2024.04.15.15.20.23
      • 2024.04.13.16.19.50
      • 2024.04.09.03.50.12
      • 2024.04.01.17.07.11
      • 2024.03.25.15.22.24
      • 2024.03.18.15.51.41
      • 2024.03.11.15.25.54
      • 2024.03.04.15.15.07
      • 2024.02.26.18.58.35
      • 2024.02.19.15.45.00
      • 2024.02.12.23.34.43
      • 2024.02.05.18.10.41
      • 2024.01.29.19.41.17
      • 2024.01.08.19.12.18
      • 2024.01.01.19.52.49
      • 2023.12.11.19.44.28
      • 2023.12.04.19.35.53
      • 2023.11.27.19.20.44
      • 2023.11.20.09.09.57
      • 2023.11.14.19.30.29
      • 2023.11.06.20.32.30
      • 2023.11.01.00.18.44
      • 2023.10.30.16.27.33
      • 2023.10.09.17.18.13
      • 2023.09.25.22.11.48
      • 2023.09.18.10.25.25
      • 2023.09.11.17.34.23
      • 2023.09.05.17.09.13
      • 2023.09.04.20.20.34
      • 2023.08.28.19.38.22
      • 2023.08.22.06.04.39
      • 2023.08.14.16.26.44
      • 2023.08.08.21.19.44
      • 2023.07.28.23.42.26
      • 2023.07.24.21.23.45
      • 2023.07.20.17.25.42
      • 2023.07.19.19.15.39
      • 2023.07.17.21.49.20
      • 2023.07.10.08.29.25
      • 2023.07.06.14.52.49
      • 2023.07.05.17.56.39
      • 2023.07.03.18.19.32
      • 2023.06.26.20.22.48
      • 2023.06.19.17.31.24
      • 2023.06.13.00.28.40
      • 2023.06.05.14.48.06
      • 2023.05.23.17.02.26
      • 2023.05.22.15.55.57
      • 2023.05.15.22.13.27
      • 2023.05.02.19.17.32
      • 2023.04.23.23.07.51
    • Ingestion server changelogs
      • 2025.01.29.17.31.09
      • 2024.10.18.03.31.56
      • 2024.09.09.05.40.20
      • 2024.08.15.17.06.40
      • 2024.07.19.17.07.25
      • 2024.06.28.20.22.20
      • 2024.06.13.17.07.56
      • 2024.05.27.13.36.10
      • 2024.05.20.19.47.22
      • 2024.05.10.03.01.22
      • 2024.04.18.16.49.08
      • 2024.04.04.14.33.24
      • 2024.03.06.16.40.36
      • 2024.02.28.18.32.08
      • 2024.02.07.18.41.16
      • 2024.01.18.18.31.08
      • 2023.12.12.17.23.14
      • 2023.12.06.19.13.35
      • 2023.11.14.18.39.29
      • 2023.10.25.06.38.07
      • 2023.10.19.06.08.15
      • 2023.10.06.18.02.20
      • 2023.09.29.17.40.50
      • 2023.09.05.18.56.18
      • 2023.08.29.17.36.35
      • 2023.07.21.20.19.21
      • 2023.07.05.17.46.34
      • 2023.06.13.00.25.04
      • 2023.06.07.17.56.30
      • 2023.05.17.22.57.37
      • 2023.05.03.22.29.52
  • Nuxt frontend
    • Guides
      • Frontend quickstart guide
      • Running frontend tests
      • Analytics
      • SVG Icon Sprites in Openverse Frontend
      • Translate
    • Reference
      • Internationalization
      • Feature flags
      • Testing Guidelines
      • Miscellaneous notes on the frontend
      • Nuxt Healthcheck
      • Frontend reverse proxy
  • General development guidelines
    • Get started with contributions
      • GitHub contribution practices
      • Development workflow
      • Current maintainers
      • Communication aliases
      • Becoming a Committer
      • Regular maintainer tasks
      • Codespell Configuration : spellcheck pre-commit hook
      • Maintainer guidelines for “Good first” and “Help wanted” issues
    • General setup guide
      • Frontend quickstart guide
      • API quickstart guide
      • Catalog quickstart guide
      • Ingestion server quickstart guide
    • Run
    • Test
    • Zero Downtime and Database Management
    • Logging
    • Stack
    • Using workspaces
  • Ingestion server
    • Guides
      • Ingestion server quickstart guide
      • Configuration
      • Mapping database tables to Elasticsearch
      • Testing guide
      • Index migration runbook
      • Manual index upgrade runbook
      • Troubleshooting
    • Reference
      • Elasticsearch and Indexing
      • Safety and Security Considerations
      • Notifications
      • Data Refresh Limit
      • Ingestion server API
  • Managing the Openverse
    • Brand assets
    • Responding to Incidents
      • Runbooks
        • Incident Response Runbook
    • Project boards
      • Issues project: Openverse Backlog
      • PR project: Openverse PRs
      • Project project: Openverse Project Tracker
      • Discussion project: Openverse Discussions
    • CI + CD workflow
      • Actions
      • Jobs
        • Preparation jobs
        • Frontend jobs
        • Packages jobs
        • Docker jobs
        • Catalog jobs
        • Ingestion server jobs
        • API jobs
        • Documentation jobs
        • Deployment jobs
        • Notification jobs
      • Flow
      • Proof-of-functionality
      • Artifacts
    • Openverse decision-making process
      • Process description
      • How to follow the process in different settings
      • Additional practices
    • Documentation
      • Quickstart guide
      • Documentation guidelines
      • Adding a new documentation page
      • Sphinx extensions
      • Documentation proofreading and review
    • Monitoring the Openverse
      • Traffic Management
        • Identifying and Blocking Traffic Anomalies in Cloudflare
      • Log querying
      • Runbooks
        • Run Book: API Production HTTP 2XX responses count under threshold
        • Run Book: API Production HTTP 5XX responses count above threshold
        • Run Book: API Production Average Response Time above threshold
        • Run Book: API Production Average Response Time anomaly
        • Run Book: API Production P99 Response Time above threshold
        • Run Book: API Production P99 Response Time anomaly
        • Run Book: API Production Request Count anomalously high
        • Run Book: Nuxt 2XX responses count under threshold
        • Run Book: Nuxt 5XX responses count above threshold
        • Run Book: Nuxt Production Average Response Time above threshold
        • Run Book: Nuxt Production Average Response Time anomalously high
        • Run Book: Nuxt Production P99 Response Time above threshold
        • Run Book: Nuxt Production P99 Response Time anomalously high
        • Run Book: Nuxt Request Count anomalously high
        • Run Book: Unhealthy hosts for ECS service
    • Openverse Infrastructure Maintenance
      • Elasticsearch cluster maintenance
    • Media properties
      • Catalog Media Properties
      • API Media Properties
      • Frontend Media Properties
      • Extract-Transform-Load flows
    • Releasing and deploying code
      • API deployment runbook
      • Catalog deployment runbook
      • Frontend deployment runbook
      • Ingestion server deployment runbook
  • Subpackages
    • @openverse/api-client
    • @openverse/eslint-plugin
      • analytics-configuration
      • no-unexplained-disabled-test
    • openverse-attribution
  • Projects
    • Project Planning
    • Template: Implementation Plan
    • Template: Project Directory index.md
    • Template: Project Proposal
    • Yearly Planning
      • Yearly Planning: Process Outline
      • Project Themes
    • 3D Model Support
      • 2022-02-21 Project Proposal: 3D model support
    • Additional Search Views
      • 2023-04-24 Project Proposal: Additional search views
      • 2023-07-20 Implementation Plan: Additional Search Views
      • SUPERSEDED 2023-07-20 Implementation Plan: Additional Search Views
    • Analytics
      • 2022-10-06 Implementation Plan: Frontend event tracking
      • 2023-03-07 Implementation Plan: Analytics backend and visualisation service
    • Core User Interface Improvements
      • 2023-03-14 Project Proposal: Core UI Improvement
    • Dark Mode
      • 2024-03-13 Project Proposal
      • 2024-03-25 Implementation Plan: Dark Mode
    • Data Normalization
      • 2024-02-27 Implementation Plan: Catalog Data Cleaning
    • Document all media properties
      • 2023-03-07 Project proposal for Document all media properties
      • 2023-04-26 Implementation Plan: Document all media properties in the catalog
      • 2024-03-25 Implementation Plan: Document all media properties in the API
      • Samples
        • Openverse Media Properties
        • sample_media_properties.md
        • sample_postamble.md
        • sample_preamble.md
    • Samples
      • Openverse Media Properties
      • sample_media_properties.md
      • sample_postamble.md
      • sample_preamble.md
    • Feature Flags
      • 2022-03-09 Project Proposal: Feature flags
    • Frontend UI State Cookie
      • 2022-02-18 Project Propsal: Frontend UI State Cookie
    • Openverse Infrastructure
      • 2024-01-05 Implementation Plan: Finish moving all services to openverse.org
    • Ingestion server removal
      • 2024-03-19 Project Proposal: Removal of the Ingestion Server
      • 2024-03-28 Implementation Plan: Ingestion Server Removal
    • Monitoring
      • 2022-03-07 Project Proposal: Monitoring
      • 2023-06-06 Implementation Plan: Baseline Alarms for ECS Services
        • Stable Run Book Sample
        • Unstable Run Book Sample
    • Monorepo
      • 2022-11-24 Project Proposal: Monorepo
    • Nuxt 3 Migration
      • 2023-06-02 Project Proposal
    • Popularity Calculation Optimizations
      • 2023-04-06 Project Proposal: Popularity Calculation Optimizations
      • Implementation Plan: Decoupling Popularity Calculations from the Data Refresh
    • Project board improvements
      • 2023-09-13 Project proposal: Project board improvements
      • 2023-09-14 Implementation plan: Project automations
    • Providing and maintaining an Openverse image dataset
      • 2023-07-06 Project Proposal: Providing and maintaining an Openverse image dataset
    • Python packaging and code sharing
      • 2024-04-12 Implementation Plan: Switching to a new Python package manager
    • Rekognition Data Incorporation
      • 2024-03-20 Project Proposal: Incorporate Rekognition data into the Catalog
      • 2024-04-23 Implementation Plan: Machine-generated tags in the API
      • 2024-05-08 Implementation Plan: Machine-generated tags in the frontend
      • 2024-05-30 Implementation Plan: Augment the catalog database with suitable Rekognition tags
      • Appendix
        • Rekognition Labels
    • Relicensing
      • 2024-10-28 Implementation Plan: Relicensing
      • 2024-10-28 Project Proposal: Relicensing
    • Search Relevancy Sandbox
      • 2023-03-31 Project Proposal: Search relevancy sandbox
      • 2023-04-06 Implementation Plan: Update Staging Database
      • 2023-05-18 Implementation Plan: Rapid iteration of ingestion server index configuration
      • 2023-06-08 Implementation Plan: Staging Elasticsearch Reindex DAGs
    • Sensitive Content Report Moderation Initial Practices
      • 2023-04-11 Project Proposal: Sensitive content report moderation: initial practices
      • 2023-05-17 Implementation Plan: Copy updates mature -> sensitive
      • 2023-12-08 Implementation Plan: Django admin tools and access control for moderators
      • 2024-01-22 Implementation Plan: Bulk Moderation Actions
      • 2024-01-22 Implementation Plan: Moderation response times
    • Detecting and Blurring Sensitive Textual Content
      • 2023-03-09 Implementation Plan: Sensitive Terms List
      • 2023-03-09 Project Proposal: Detecting sensitive textual content and blurring all sensitive results
      • 2023-03-30 Implementation Plan: Filtering and designating results with sensitive textual content
      • 2023-05-06 Implementation Plan: Fetching, blurring sensitive results
      • 2024-09-03 Implementation Plan: Undo the split indices for filtered textual sensitivity
    • Trust and Safety
      • 2023-01-09 Initial Overview and User Stories
      • Sensitive Content Report Moderation Initial Practices
        • 2023-04-11 Project Proposal: Sensitive content report moderation: initial practices
        • 2023-05-17 Implementation Plan: Copy updates mature -> sensitive
        • 2023-12-08 Implementation Plan: Django admin tools and access control for moderators
        • 2024-01-22 Implementation Plan: Bulk Moderation Actions
        • 2024-01-22 Implementation Plan: Moderation response times
      • Detecting and Blurring Sensitive Textual Content
        • 2023-03-09 Implementation Plan: Sensitive Terms List
        • 2023-03-09 Project Proposal: Detecting sensitive textual content and blurring all sensitive results
        • 2023-03-30 Implementation Plan: Filtering and designating results with sensitive textual content
        • 2023-05-06 Implementation Plan: Fetching, blurring sensitive results
        • 2024-09-03 Implementation Plan: Undo the split indices for filtered textual sensitivity
    • Visual Regression Testing
      • 2022-02-17 Implementation Plan: Visual regression testing
    • Pinia Conversion
      • 2022-02-23 Project Proposal: Vuex to Pinia conversion
  • Openverse Terms of Service

External links

  • Openverse
  • GitHub
Back to top
View this page
Edit this page

2022-02-18 Project Propsal: Frontend UI State Cookie¶

Author: @sarayourfriend

  • [x] @obulat

  • [x] @zackkrida

Milestone

Rationale¶

We removed all the cookies from the application. That’s a good thing generally. But we can use cookies without a banner and still be GDPR compliant as long as the cookies are necessary for providing a smoother user experience.

Doing this would fix problems like the UI pop in/out in this video.

GDPR rules¶

To quote from https://gdpr.eu/cookies:

Strictly necessary cookies — These cookies are essential for you to browse the website and use its features, such as accessing secure areas of the site. Cookies that allow web shops to hold your items in your cart while you are shopping online are an example of strictly necessary cookies. These cookies will generally be first-party session cookies. While it is not required to obtain consent for these cookies, what they do and why they are necessary should be explained to the user.

I believe the cookie I am proposing we add in this RFC falls under this and we would not need a consent banner for it.

We should however add an explanatory page for our cookie usage; potentially this could just be a general “Privacy” page that links out to the WP.org privacy policy and explains Openverse specific things.

Cookie shape¶

Let’s introduce one “ui state” cookie that encodes the following:

interface UIStateCookie {
  /**
   * Whether the filter sidebar was open during the last page load
   * @defaultValue false
   */
  filterSidebarOpen: boolean;
  /**
   * Record of translation banners that have been dismissed.
   * For increased privacy through obsurity, only actually dismissed
   * locales are present, that way there isn't a running record
   * of all the locales the client has visited.
   */
  translationBannerDismissed: { [slug: WPLocaleSlug]?: true };
  /**
   * The breakpoint of the most recent page load.
   * We do not store the exact screen width because we don't need it
   * and it could inadvertently be used for fingerprinting.
   *
   * The default value will be `md` for non-mobile UAs or when a UA is
   * unavailable. For mobile UAs it will default to `mob`.
   */
  breakpoint: 'xl' | 'lg' | 'md' | 'sm' | 'mob';
}

Implementation plan¶

  • [ ] useUiStateCookie() -> Returns an existing cookie or creates a new one and saves it. It should be a reactive object with custom set handlers to update the stored cookie value. Creating a new one should sniff the UA for the correct default value for breakpoint.

    • Additionally: useSyncUiStateCookieBreakpoint() -> Called by useUiStateCookie to sync the breakpoint upon resizing.

  • [ ] Update useMediaQuery to use the ui state cookie to deduce a default for shouldPassInSSR based on the breakpoint value.

  • [ ] Update the translation banner dismissal to set the cookie property and read from it to determine whether to show.

  • [ ] Update filter sidebar opening to set the cookie property and read from it to determine whether to show.

  • [ ] Add new Privacy page that explains our use of cookies and links to WP.org’s Privacy policy. Replace the page menu privacy link to use the internal one.

Next
Openverse Infrastructure
Previous
Frontend UI State Cookie
Made with Sphinx and @pradyunsg's Furo
On this page
  • 2022-02-18 Project Propsal: Frontend UI State Cookie
    • Rationale
    • GDPR rules
    • Cookie shape
    • Implementation plan