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

refactor: Alter layout and copy of Feedback component in Footer #3542

Merged
merged 8 commits into from
Aug 22, 2024

Conversation

RODO94
Copy link
Contributor

@RODO94 RODO94 commented Aug 21, 2024

What does this PR do?

This PR alters the <Feedback> component which sits within the footer of a public facing service.

It is connected to the Trello ticket: https://trello.com/c/bpbCvQzH/2969-update-the-feedback-message-within-the-editor-to-warn-users-that-it-is-not-monitored-daily

I have prototype 3 solutions:

Option [1]

Screenshot 2024-08-21 at 14 31 05

Option [2]

Screenshot 2024-08-21 at 14 30 18

Option [3]

Screenshot 2024-08-21 at 14 29 58

@RODO94
Copy link
Contributor Author

RODO94 commented Aug 21, 2024

In draft state to prototype solutions, then I'll tidy up UI elements and push up for review.

Copy link

github-actions bot commented Aug 21, 2024

Removed vultr server and associated DNS entries

@RODO94
Copy link
Contributor Author

RODO94 commented Aug 21, 2024

Option 1 will be taken forward from Trello Ticket feedback

@RODO94 RODO94 marked this pull request as ready for review August 21, 2024 15:13
@RODO94
Copy link
Contributor Author

RODO94 commented Aug 21, 2024

@RODO94 RODO94 requested a review from a team August 21, 2024 15:15
@@ -52,8 +54,9 @@ const FeedbackForm: React.FC<FormProps> = ({ inputs, handleSubmit }) => {
return (
<Formik initialValues={initialValues} onSubmit={handleSubmit}>
<StyledForm>
<FeedbackDataDisclaimer />
Copy link
Contributor Author

@RODO94 RODO94 Aug 21, 2024

Choose a reason for hiding this comment

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

Split this <FeedbackDisclaimer> into two imports for each disclaimer, one focused on personal / financial data as <FeedbackDataDisclaimer> and one focused on the monitoring of the feedback <FeedbackMonitoringDisclaimer>.

Situated them in the same file as they both serve similar functions and contextually relevant, but seperate enough in structure to have as separate components.

Be good to have thoughts on this pattern...

Copy link
Contributor

Choose a reason for hiding this comment

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

Generally, if we have a shared content/structure it can make sense to make a component that handles structure/style, and passed in content via a prop (or in this case, I think children would be more appropriate).

This would mean that we wouldn't have to repeat this structure / style markdown -

<Box>
  <Typography variant="body2">
  ...
  </Typography>
</Box>

We could instead use a pattern like this -

// FeedbackDisclaimer.tsx
<Box>
  <Typography variant="body2">
  {children}
  </Typography>
</Box>
// FeedbackFrom.tsx
<Disclaimer>
  Some content here!
</Disclaimer>

<Disclaimer>
  Some other content here!
</Disclaimer>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@DafyddLlyr thanks! Switched it to this. It felt interesting cause the text was contextually linked but had a different structure, with a link in the text. Just passed it now as it is. Hope this is cleaner

@@ -52,8 +54,9 @@ const FeedbackForm: React.FC<FormProps> = ({ inputs, handleSubmit }) => {
return (
<Formik initialValues={initialValues} onSubmit={handleSubmit}>
<StyledForm>
<FeedbackDataDisclaimer />
Copy link
Contributor

Choose a reason for hiding this comment

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

Generally, if we have a shared content/structure it can make sense to make a component that handles structure/style, and passed in content via a prop (or in this case, I think children would be more appropriate).

This would mean that we wouldn't have to repeat this structure / style markdown -

<Box>
  <Typography variant="body2">
  ...
  </Typography>
</Box>

We could instead use a pattern like this -

// FeedbackDisclaimer.tsx
<Box>
  <Typography variant="body2">
  {children}
  </Typography>
</Box>
// FeedbackFrom.tsx
<Disclaimer>
  Some content here!
</Disclaimer>

<Disclaimer>
  Some other content here!
</Disclaimer>

@RODO94 RODO94 requested a review from DafyddLlyr August 22, 2024 10:16
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

A few very small things to look at 👍

editor.planx.uk/src/ui/public/FeedbackDisclaimer.tsx Outdated Show resolved Hide resolved
editor.planx.uk/src/ui/public/FeedbackDisclaimer.tsx Outdated Show resolved Hide resolved
editor.planx.uk/src/components/Feedback/FeedbackForm.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

Perfect!

@RODO94 RODO94 merged commit 900e30b into main Aug 22, 2024
12 checks passed
@RODO94 RODO94 deleted the rory/update-feedback-message branch August 22, 2024 10:58
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