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: Add custom color picker #474

Merged
merged 14 commits into from
Oct 6, 2024
Merged

feat: Add custom color picker #474

merged 14 commits into from
Oct 6, 2024

Conversation

tunny17
Copy link
Collaborator

@tunny17 tunny17 commented Sep 19, 2024

What does this PR do?

Fixes # (place issue number here without bracket)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change adds a new database migration
  • This change requires a documentation update

How should this be tested?

  • Test A
  • Test B

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand bits
  • Ran pnpm build
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the ClassroomIO Docs if changes were necessary

Copy link

github-actions bot commented Sep 19, 2024

Thank you for following the naming conventions for pull request titles! 🙏

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cio-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 6, 2024 0:17am
cio-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 6, 2024 0:17am

Copy link
Collaborator

@rotimi-best rotimi-best left a comment

Choose a reason for hiding this comment

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

Great progress so far

Comment on lines 206 to 214
.theme-custom .bg-primary-50 {
background-color: #fff1f2 !important;
}
.theme-custom .text-primary-50 {
color: #fff1f2 !important;
}
.theme-custom .border-primary-50 {
border-color: #fff1f2 !important;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

@tunny17 This should probably not be here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, my bad, i'll remove that in this fix i'm about to push

if (!hex) return;

// Create a promise that resolves after the delay
await new Promise((resolve) => setTimeout(resolve, 1000));
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should probably remove this, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

honestly, no, whenever that picker gets dragged we update our db so if we remove this and a user drags from point a to b in 10s, we'll be sending 10 requests to supabase so i added this one to make that request on finalize

.update({ theme: hex })
.match({ id: $currentOrg.id });

console.log('Update theme', res);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Show a snackbar if an error occurs here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

alright

apps/dashboard/src/lib/utils/functions/theme.ts Outdated Show resolved Hide resolved
apps/dashboard/src/lib/utils/functions/theme.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@rotimi-best rotimi-best left a comment

Choose a reason for hiding this comment

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

LGTM

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