-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix: Show legacy web headers #1911
Conversation
src/shell/services/headTags.ts
Outdated
import { getResponseData, prepareHeaders } from "./util"; | ||
import { LegacyHeader } from "./types"; | ||
|
||
export const headTagApi = createApi({ |
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.
Our pattern isn't a new rtk query api per endpoint. It's per service. This endpoint is still on the instance service
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.
Gotcha, moved to instance.ts
src/shell/services/headTags.ts
Outdated
getLegacyHeadTags: builder.query<LegacyHeader[], void>({ | ||
query: () => `/web/headers`, | ||
transformResponse: getResponseData, | ||
keepUnusedDataFor: 0.0001, |
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.
Why does this need to exclude caching?
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.
Forgot to remove this when I copied the the block off of an already existing query
src/shell/services/headTags.ts
Outdated
query: () => `/web/headers`, | ||
transformResponse: getResponseData, | ||
keepUnusedDataFor: 0.0001, | ||
providesTags: () => [{ type: "LegacyHeadTags" }], |
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.
Providing tags here doesn't seem useful since nothing is invalidating it
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.
Removed on latest update
@theofficialnar besides the warning that there are legacy headtags present, do we display which headtags are legacy? |
@giseleblair yup, I've added it to the preview section of the head tag. Only issue I realized just now is that, the users will probably need to scan through the input fields first to find out which of these are considered legacy since I haven't indicated it on the preview - I honestly thought we just had to also make sure it's added there. |
Closes #497
Preview