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: Use constants.ts for brand colours > db DEFAULT #13167

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

sean-brydon
Copy link
Member

What does this PR do?

Removes the default and not null constraint in the users -> brandColor and darkBrandColour
This allows us to rely on the values defined in constants to use APP wide. This is useful for self hosted instances.

How should this be tested?

Start up the app and run the migrations
Change the value of the brand colours in constants.ts and notice the app wide colours change.

@sean-brydon sean-brydon added ❗️ migrations contains migration files ui area: UI, frontend, button, form, input labels Jan 11, 2024
Copy link

vercel bot commented Jan 11, 2024

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

Name Status Preview Comments Updated (UTC)
api ❌ Failed (Inspect) Jan 11, 2024 9:06am
dev ❌ Failed (Inspect) Jan 11, 2024 9:06am
5 Ignored Deployments
Name Status Preview Comments Updated (UTC)
ai ⬜️ Ignored (Inspect) Visit Preview Jan 11, 2024 9:06am
cal ⬜️ Ignored (Inspect) Visit Preview Jan 11, 2024 9:06am
cal-demo ⬜️ Ignored (Inspect) Visit Preview Jan 11, 2024 9:06am
qa ⬜️ Ignored (Inspect) Visit Preview Jan 11, 2024 9:06am
ui ⬜️ Ignored (Inspect) Visit Preview Jan 11, 2024 9:06am

Copy link
Contributor

github-actions bot commented Jan 11, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@keithwillcode keithwillcode added the core area: core, team members only label Jan 11, 2024
Comment on lines +12 to +16
UPDATE "Team" SET "brandColor" = NULL WHERE "brandColor" = '#292929';
UPDATE "Team" SET "darkBrandColor" = NULL WHERE "darkBrandColor" = '#fafafa';

UPDATE "users" SET "brandColor" = NULL WHERE "brandColor" = '#292929';
UPDATE "users" SET "darkBrandColor" = NULL WHERE "darkBrandColor" = '#fafafa';
Copy link
Member Author

Choose a reason for hiding this comment

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

Set our brand colours to NULL -> we will only now set this if a user overrides these in settings

Comment on lines +5 to +6
const BRAND_COLOR = DEFAULT_LIGHT_BRAND_COLOR;
const DARK_BRAND_COLOR = DEFAULT_DARK_BRAND_COLOR;
Copy link
Member Author

Choose a reason for hiding this comment

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

Use the values from constants -> These colours get loaded here https://github.com/calcom/cal.com/pull/13167/files#diff-abbbafbce3959191cbdfce95ed71dc38466b75d1695dd78dc81a66e4117e1d76L171-L172 if there is no brand colour passed in

Copy link

deploysentinel bot commented Jan 11, 2024

Current Playwright Test Results Summary

✅ 381 Passing - ⚠️ 10 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 01/11/2024 09:22:08am UTC)

Run Details

Running Workflow PR Update on Github Actions

Commit: b0d36ad

Started: 01/11/2024 09:10:58am UTC

⚠️ Flakes

📄   apps/web/playwright/booking/selectQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Phone Question and Each Other Question Booking With Select Question and Short text question Select and Short text not required
Retry 1Initial Attempt
0% (0) 0 / 197 runs
failed over last 7 days
3.05% (6) 6 / 197 runs
flaked over last 7 days

📄   apps/web/playwright/booking/radioGroupQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Radio Question and Each Other Question Booking With Radio Question and Address Question Booking With Radio Question and Multi email Question Radio and Multi email not required
Retry 1Initial Attempt
0% (0) 0 / 202 runs
failed over last 7 days
2.97% (6) 6 / 202 runs
flaked over last 7 days

📄   apps/web/playwright/booking/checkboxGroupQuestion.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Booking With Checkbox Group Question and Each Other Question Booking With Checkbox Group Question and Address Question Booking With Checkbox Group Question and Short text question Checkbox Group and Short Text not required
Retry 1Initial Attempt
0% (0) 0 / 199 runs
failed over last 7 days
2.51% (5) 5 / 199 runs
flaked over last 7 days

📄   apps/web/playwright/organization/organization-invitation.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Organization Email not matching orgAutoAcceptEmail Team invitation
Retry 1Initial Attempt
3.40% (7) 7 / 206 runs
failed over last 7 days
27.67% (57) 57 / 206 runs
flaked over last 7 days

📄   apps/web/playwright/signup.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Signup Flow Test Signup with valid (non premium) username
Retry 1Initial Attempt
0% (0) 0 / 209 runs
failed over last 7 days
5.26% (11) 11 / 209 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/preview.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Preview Preview - embed-core should load
Retry 1Initial Attempt
0% (0) 0 / 208 runs
failed over last 7 days
20.19% (42) 42 / 208 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/action-based.e2e.ts • 2 Flakes

Top 1 Common Error Messages

null

2 Test Cases Affected

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Popup Tests should be able to reschedule
Retry 1Initial Attempt
11.96% (25) 25 / 209 runs
failed over last 7 days
85.65% (179) 179 / 209 runs
flaked over last 7 days
Popup Tests Floating Button Popup Pro User - Configured in App with default setting of system theme should open embed iframe according to system theme when no theme is configured through Embed API
Retry 1Initial Attempt
0.48% (1) 1 / 207 run
failed over last 7 days
85.51% (177) 177 / 207 runs
flaked over last 7 days

📄   packages/app-store/routing-forms/playwright/tests/basic.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Routing Forms Seeded Routing Form Routing Link - Reporting and CSV Download
Retry 1Initial Attempt
0% (0) 0 / 209 runs
failed over last 7 days
2.39% (5) 5 / 209 runs
flaked over last 7 days

📄   packages/embeds/embed-core/playwright/tests/inline.e2e.ts • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Inline Iframe Inline Iframe - Configured with Dark Theme
Retry 1Initial Attempt
0.48% (1) 1 / 208 run
failed over last 7 days
35.10% (73) 73 / 208 runs
flaked over last 7 days

View Detailed Build Results


Copy link
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

LGTM

@PeerRich PeerRich merged commit bc6267e into main Jan 11, 2024
34 of 38 checks passed
@PeerRich PeerRich deleted the feat/brand-colors-refactor branch January 11, 2024 20:22
emrysal pushed a commit that referenced this pull request Jan 12, 2024
* fix: user proper default values if no brand colour is set.

* fix:default value

* fix: more ?? to defined default as color is possibly null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only ❗️ migrations contains migration files ui area: UI, frontend, button, form, input
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants