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

feat: Use ImgInput for logo upload #2685

Merged
merged 2 commits into from
Jan 22, 2024
Merged

feat: Use ImgInput for logo upload #2685

merged 2 commits into from
Jan 22, 2024

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Jan 19, 2024

What does this PR do?

  • Small refactor mentioned here - feat: Wire up favicon form #2680 (comment)
  • Use ImgInput component instead of PublicFileUploadButton
  • This allows us to remove images and view them, and is a little more consistent with how we handle images elsewhere in the Editor
  • Restricts logo to SVG or PNG

image

Copy link

github-actions bot commented Jan 19, 2024

Removed vultr server and associated DNS entries

@Mike-Heneghan
Copy link
Contributor

I've been noticing a small bug where when either of the forms which have the ImgInput have the "Reset Changes" selected a box with View and Change appears in the top left of the screen.

Screen.Recording.2024-01-20.at.14.51.17.mov

@Mike-Heneghan
Copy link
Contributor

I think this might be out of scope but on the pizza I noticed without a logo the preview makes it look as if it'll default to just the team name:

Screenshot 2024-01-20 at 15 08 22

Although in the service it looks like it's got the full path including "PlanX" in the top left.

Screenshot 2024-01-20 at 15 08 00

I'm not sure if I'm doing something weird or it's a quirk of the environment?

Copy link
Contributor

@Mike-Heneghan Mike-Heneghan left a comment

Choose a reason for hiding this comment

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

It's great seeing this all come together 🥳

I've got a few questions/comments which are maybe slightly more general testing notes after playing around with the feature more today.

I don't think they block this going out and maybe being reviewed/resolved in a follow up PR?

Whatever you thinks best 👍

Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

I think it's out of scope at the moment but I just noticed all the help guide links are to PlanX.

Would it be worth adding a wee "todo" comment?

<Link href="https://www.planx.uk">
  See our guide for setting theme colours and logos (TODO)
</Link>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very good catch - will update these...!

@DafyddLlyr
Copy link
Contributor Author

I think this might be out of scope but on the pizza I noticed without a logo the preview makes it look as if it'll default to just the team name:

I'll update this also thanks!

@DafyddLlyr
Copy link
Contributor Author

I've been noticing a small bug where when either of the forms which have the ImgInput have the "Reset Changes" selected a box with View and Change appears in the top left of the screen.

Yep, I can re-create this. Taking a look!

@DafyddLlyr
Copy link
Contributor Author

@Mike-Heneghan Thanks for the review and testing - much appreciated! These comments should all be addressed in 5703093

@Mike-Heneghan
Copy link
Contributor

Thanks for updating to resolve that feedback @DafyddLlyr 🙌

I've seen some slightly odd behaviour on the pizza with what seems like the logo resetting to what it was originally if other forms have updates:

Screen.Recording.2024-01-22.at.10.26.38.mov

I'm not sure if it's a caching setting in my browser or maybe the different forms are loading with the initial values on first render and overwriting the changed logo when the other forms are submitted?

@DafyddLlyr
Copy link
Contributor Author

I've seen some slightly odd behaviour on the pizza with what seems like the logo resetting to what it was originally if other forms have updates:

Ah this is caused by a shared form config but not a shared form state 🤦 Maybe over simplifying things in #2684

As it's not introduced in this PR (and may be a change which touches a few files) I'll pick it up on a new branch and merge this as-is for now 👍

@DafyddLlyr DafyddLlyr merged commit 61b9781 into main Jan 22, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/img-input-logo branch January 22, 2024 11:11
@DafyddLlyr
Copy link
Contributor Author

DafyddLlyr commented Jan 22, 2024

Thanks for updating to resolve that feedback @DafyddLlyr 🙌

I've seen some slightly odd behaviour on the pizza with what seems like the logo resetting to what it was originally if other forms have updates:

Screen.Recording.2024-01-22.at.10.26.38.mov
I'm not sure if it's a caching setting in my browser or maybe the different forms are loading with the initial values on first render and overwriting the changed logo when the other forms are submitted?

@Mike-Heneghan This is addressed in the following PR - #2688

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