Skip to content

Extract _user_util_links partial into a configurable ViewComponent - #3979

Open
jcoyne wants to merge 1 commit into
mainfrom
user-util-links-component
Open

jcoyne wants to merge 1 commit into
mainfrom
user-util-links-component

Conversation

@jcoyne

@jcoyne jcoyne commented Nov 24, 2026

Copy link
Copy Markdown
Member

Moves the markup from shared/_user_util_links.html.erb into a new Blacklight::UserUtilLinksComponent. The partial now only renders the component, so apps that override the partial keep working.

The component class can be set in the config:

config.user_util_links_component = MyApp::UserUtilLinksComponent

The rendered HTML is the same as before. One small change: the component reads dark_mode_support from the blacklight_config passed to it, not from the dark_mode_support? helper.

The partial now only renders the component, whose class is configurable
via blacklight_config.user_util_links_component.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant