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

#3060-Edit Organization Logo #3065

Merged
merged 18 commits into from
Dec 21, 2024

Conversation

caiodasilva2005
Copy link
Contributor

@caiodasilva2005 caiodasilva2005 commented Dec 14, 2024

Changes

Added an admin tool to update the organization's logo

Notes

  • There are some small sizing changes to some other components to make everything look good on the guest view tab

Screenshots

*Video in slack thread

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No yarn.lock changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #3060

Copy link
Contributor

@Peyton-McKee Peyton-McKee left a comment

Choose a reason for hiding this comment

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

looks good other than just not showing anything when there isnt an image

Copy link
Contributor

Choose a reason for hiding this comment

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

this should not be here

return await downloadGoogleImage(fileId);
} catch {
// return default logo if fileId was not found
return await getDefaultImageData();
Copy link
Contributor

Choose a reason for hiding this comment

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

no lets not do this. return undefined if it. doesnt exist

@@ -1,5 +1,5 @@
-- AlterTable
ALTER TABLE "Organization" ADD COLUMN "logoImage" TEXT;
ALTER TABLE "Organization" ADD COLUMN "logoImageId" TEXT;
Copy link
Contributor

Choose a reason for hiding this comment

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

ensure at some point you consolidate all of your migration files to just one migration called home-page-redesign

Copy link
Contributor

@Peyton-McKee Peyton-McKee left a comment

Choose a reason for hiding this comment

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

looking good


const EditLogo = () => {
const { data: organization, isLoading: organizationIsLoading } = useCurrentOrganization();
const { data: imageData, isLoading: imageDataIsLoading } = useOrganizationLogo();
Copy link
Contributor

Choose a reason for hiding this comment

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

add error handling for these queries. Ensure all useQueries added have proper error handling.


const onSubmit = async (logoInput: EditLogoInput) => {
try {
console.log(logoInput);
Copy link
Contributor

Choose a reason for hiding this comment

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

remove console

try {
console.log(logoInput);
if (!logoInput.logoImage) {
handleClose();
Copy link
Contributor

Choose a reason for hiding this comment

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

we should probably toast why were closing

<NERFailButton sx={{ mx: 1 }} form={'edit-organization-logo'} onClick={onHideWrapper}>
Cancel
</NERFailButton>
<NERSuccessButton
Copy link
Contributor

Choose a reason for hiding this comment

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

this is weird. were gonna be submitting twice. Wee should remove this onclick prop and delete the onSubmitWrapper.

@Peyton-McKee Peyton-McKee merged commit b0e6b87 into feature/homepage-redesign Dec 21, 2024
4 checks passed
@Peyton-McKee Peyton-McKee deleted the #3060-Caio-EditOrgLogo branch December 21, 2024 17:11
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