Skip to content
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 postMessage in embedded Contact form #2673

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

RoyEJohnson
Copy link
Contributor

@RoyEJohnson RoyEJohnson commented Oct 1, 2024

CORE-532
This makes the embedded Contact form (mostly) like the designs.

  • Display just the form, not the header or mailing address sections
  • After form submit, show a minimalist thank you page
  • Dismissing the thank you sends a postmessage to the parent window
  • Default question topic to OpenStax Assignable for the embedded form

@RoyEJohnson RoyEJohnson force-pushed the fix-postmessage-in-embedded-contact-form branch 2 times, most recently from 9f2a21f to 74925e1 Compare October 1, 2024 22:28
@RoyEJohnson RoyEJohnson requested a review from jivey October 1, 2024 22:32
Copy link
Member

@jivey jivey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly small CSS concerns.

<h1>Report an issue</h1>
<div>
Need to suggest a content correction instead? Fill out the{' '}
<a href="/errata" target="_blank">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is outside the scope of these changes but just wondering if we have a card to track this clipping issue on the prod errata page:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the errata page with no book in the URL. With a book, the header gets populated and the selectors at the top are pushed down. Without a book, the page is useless.
https://openstax.org/errata/?book=Principles%20of%20Accounting%2C%20Volume%201%3A%20Financial%20Accounting

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have the book info inside this form to make the right url? Otherwise it seems like we should remove the link.

Copy link
Contributor Author

@RoyEJohnson RoyEJohnson Oct 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D'oh! I just plugged that link in there and never thought about it.
I've updated the paragraph to direct them to the Subjects page. It's a bit cumbersome for them, but I don't think we can reliably send the book title (which is what the errata form needs).

src/app/pages/contact/embedded.js Outdated Show resolved Hide resolved
src/app/pages/contact/form.js Show resolved Hide resolved
@@ -0,0 +1,30 @@
@import 'pattern-library/core/pattern-library/headers';

.embedded-contact {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need some padding to push the text over or down to accommodate the close button:
image

(and I think this is on your assignments PR, but seems like some padding issue with that button?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reworked the put-away as a back button in a footer (like the design).
PR for that is:
https://github.com/openstax/assignments/pull/192

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might need some position: fixed rules? But I'll let ya'll work that out on that PR
image

@RoyEJohnson RoyEJohnson force-pushed the fix-postmessage-in-embedded-contact-form branch from 6c131f4 to d9697b1 Compare October 7, 2024 16:53
@RoyEJohnson RoyEJohnson requested a review from jivey October 7, 2024 19:40
Copy link
Member

@jivey jivey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are looking good, just have a question about the errata url

@RoyEJohnson RoyEJohnson requested a review from jivey October 9, 2024 18:54
Copy link
Member

@jivey jivey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The form is looking good, I'm still seeing some layout issues but those are on the assignments side.
image

@RoyEJohnson RoyEJohnson merged commit 097a0de into main Oct 16, 2024
1 check passed
@RoyEJohnson RoyEJohnson deleted the fix-postmessage-in-embedded-contact-form branch October 16, 2024 14:47
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.

2 participants