-
Notifications
You must be signed in to change notification settings - Fork 9
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 search-with-autocomplete component as assets #3532
Merged
Merged
Conversation
This file contains 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
kevindew
added a commit
to alphagov/govuk_publishing_components
that referenced
this pull request
Dec 11, 2024
This adds the search-with-autocomplete component to the list of those served by static. We are adding this to static in: alphagov/static#3532
This adds in search-with-autocomplete to the global assets that static uses, this is added because the layout-super-navigation-header makes use of the search-with-autocomplete component. The motivation for this change was to resolve a bug when we pushed search-with-autocomplete live and we discovered that the autocomplete only rendered and operated correctly on a few pages that already had the component embedded. The reason this was not operational was because the CSS and JavaScript were not available unless the autocomplete was already embedded. There was a decision to make as to whether to add the dependency to the layout-super-navigation-header component or to add them separately here. I've gone with the separate approach as that was the precedent already used for the search nested component. Following this change I'm going to go through and remove the previous embeddings of the JS and CSS so that we don't have it included twice.
kevindew
force-pushed
the
fix-search-autocomplete
branch
from
December 11, 2024 14:44
1effbc5
to
5bf9522
Compare
kevindew
added a commit
to alphagov/govuk_publishing_components
that referenced
this pull request
Dec 11, 2024
This adds the search-with-autocomplete component to the list of those served by static. We are adding this to static in: alphagov/static#3532 and want to avoid serving this stylesheet unnecessarily to users.
kevindew
added a commit
to alphagov/govuk_publishing_components
that referenced
this pull request
Dec 11, 2024
This adds the search-with-autocomplete component stylesheet to the list of those served by static. We are adding this to static in: alphagov/static#3532 and want to avoid serving this stylesheet unnecessarily to users.
leenagupte
approved these changes
Dec 11, 2024
kevindew
added a commit
to alphagov/frontend
that referenced
this pull request
Dec 11, 2024
This javascript is now provided by static [1] and is thus removed from this repo to ensure that we don't send the same asset to users multiple times unnecessarily. It continues the convention of applications only adding the JS of components which are not provided by static [2]. [1]: alphagov/static#3532 [2]: #3281
kevindew
added a commit
to alphagov/finder-frontend
that referenced
this pull request
Dec 11, 2024
This javascript is now provided by static [1] and is thus removed from this repo to ensure that we don't send the same asset to users multiple times unnecessarily. It continues the convention of applications only adding the JS of components which are not provided by static [2]. [1]: alphagov/static#3532 [2]: #2819
kevindew
added a commit
to alphagov/govuk-helm-charts
that referenced
this pull request
Dec 11, 2024
We believe we have resolved the issues now that led to this feature being disabled (see: alphagov/static#3532)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds in search-with-autocomplete to the global assets that static uses, this is added because the layout-super-navigation-header makes use of the search-with-autocomplete component.
The motivation for this change was to resolve a bug when we pushed search-with-autocomplete live and we discovered that the autocomplete only rendered and operated correctly on a few pages that already had the component embedded. The reason this was not operational was because the CSS and JavaScript were not available unless the autocomplete was already embedded.
There was a decision to make as to whether to add the dependency to the layout-super-navigation-header component or to add them separately here. I've gone with the separate approach as that was the precedent already used for the search nested component.
Following this change I'm going to go through and remove the previous embeddings of the JS and CSS so that we don't have it included twice.
Follow these steps if you are doing a Rails upgrade.