-
Notifications
You must be signed in to change notification settings - Fork 0
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
Core Content Pages: Render CTAs and contact cards within Service Entries #340
Closed
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
…core-content-ctas
SQUASHME: client creation in Nav rename contentful implementation file remove unnecessary type declaration don't override page data with the document; pass query to frontend rename contentful/client to contentful/graphqlClient convert under construction page to use GraphQL client fix e2e header tests fix loadMainNav when there is no Contentful connection remove unnecessary query variable from page data add server-side contentful previewing w/contentful auth ignore unused vars that start with _ improve server loading enable previewing in nav graphql query WIP fix import add management client to try block delete cookie on logout don't store the user token in localStorage; let it expire fix oauth callback page make sure user is activated add some debug logging decode the cookie values fiddling with the cookie move logout logic to an action use sveltekit's fetch function instead of global fetch when possible debugging reduce token scope can we use the user's token instead of a global one? move codegen config; separate schema and schema type generation switch default scalar type to "unknown" to avoid "any" pollution update package scripts to generate schema types correctly make preview authentication universal let contentful embed the site fix package scripts throw preview authentication errors in layout not handler fix broken oauth link request correct token WIP disable layout error WIP catch preview auth errors with an actual layout import component remove unused preview client add missing baseURL variable stop throwing errors in the root layout make errors more detailed silly mistake another silly mistake set CSP in a hook in addition to vercel settings try it again try with x-frame-options allow cookies to pass to frame fix sameSite setting WIP does this work fix cookie samesite handling tighten up CSP improve CSP headers create the server-side contentful client in a single place add previewing to all gql queries update schemas fix homepage fix linting; add query variable typing add a trailing newline add new env variables to env.d.ts make LoginLink accept anchor element props open login link in new window if it's in an iframe fix a test make contentful oauth endpoint an environment variable refresh the page on logout make LoginLink a little nicer improve parseHashQuery parseHashQuery should return Record<string, string> logout should only be available in the browser run prebuild before building storybook avoid errors when $page or $page.url are undefined update schemas use null to explicitly delete cookie and localStorage entries improve cookie deletion add trailing newline reuse setCookie to define deleteCookie undo "fix" to parseHashQuery add preview parameter when navigating from a preview set preview to previous preview value use workaround to preserve query parameter cf. sveltejs/kit#10122 small refactors to root layout only add preview param to URLs that don't already have it move a variable refactor logout action with "get" from svelte/store improve graphqlClient tests get current user on the server fix User component work around weird test error use new /login and /logout endpoints for http-only contentful auth remove unnecessary type annotations make login/logout logic work without hard refreshing mock $app/stores to fix tests disable flaky eslint rule that's already covered by ts use "import type" in app.d.ts remove unused imports add tests of cookie functionality more tests of cookies remove a bunch of dead code various changes prior to setting up redis token handling tests for handleToken set up docker compose with redis redis authentication complete; still need to fix tests update office/organization page to support new preview functionality also queries based on the slug instead of grabbing all office page entries support passing "unknown" to ContentfulRichText fix test-contentful-content page lots of testing of handleToken; some improvements to it shorten a line don't merge office page with layout data add missing test file lots of testing and improvements lots more progress and tests, including adding a logging service add handleError hooks to the client and server set url context in handleError on both client and server add some comments rearrange logging code; fix tests and dev; use new message format fix a type error remove a weird emacs thing in tsconfig stop exposing logger on window expand some comments fix file capitalization fix syntax error add type definitions for new env variables add example values for new env variables remove .only from describe remove unused imports simplify ContentfulLoginLink show footer when there is a previewAuthenticationError use Link for special links; fix a LoginLink bug update schema and migrate from "metadata" to "pageMetadata" await error logging in handleError actually run the error handling fix some types fix some prop types improve the nav loading to get rid of type assertions fix test data move redis client creation into its own hook fix type errors don't import devalue parse ahead of time fix type errors get the redis client working in docker get types checking and some tests passing again fix nav fix a type issue move server hooks into their own files (still need to fix tests) big refactoring and improved tests remove old redis service move contentful service into a server-only folder improvements to error handling and logging use dynamic env for KV_URL run end-to-end tests with docker compose fix formatting don't show logout button when not logged in small updates to login page fix bad import add comment to token duration
…core-content-ctas
…ttps://github.com/la-ldaf/ldaf-site into dan/core-content-ctas-plus-preview-auth
We already had support for "hyperlink" and "asset-hyperlink" nodes. This adds support for "entry-hyperlink", with the only remaining inline type to account for from Contentful being "embedded-entry-inline".
…core-content-ctas-plus-preview-auth
- Entries are either a contact (render contact card) or page details (render as a button) - Assets render as a button
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Moved to #350 |
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.
Jira ticket: LDAF-359
Proposed changes
This pulls in the changes from both #274 and #279, so the diff is very large right now. Skip to my commits for the relevant changes:
EntryHyperlink.svelte
component for to render those types of Rich Text NodescontactInformationCollection
andserviceCtaCollection
to what gets requested on the service entries in the graphQL query. I’m working through making sure all the CTA types render as outlined here (urls and contact cards definitely work, I think assets and page details do, but not 100% sure on those 2 yet)usa-button
class is getting applied via a query selector on render. I don’t love that solution but not sure if there’s an immediately cleaner wayEntryHyperlink.svelte
(and a little glue to get that working) are within thepage.svelte
andpage.server.ts
files for theserviceGroup
pageScreenshots
Example accordion with contact info and CTA button on

/plants/nurseries-landscaping
(this from the last "nursery inspections" accordion on the page):Acceptance criteria validation
Other details
Alternate solutions
Possible drawbacks
Requested feedback