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 project flags component #6070

Merged
merged 9 commits into from
Jan 31, 2024
Merged

Conversation

FredrikOseberg
Copy link
Contributor

This PR adds project flags line chart component

Copy link

vercel bot commented Jan 30, 2024

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

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2024 8:20pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2024 8:20pm

import { formatDateYMD } from 'utils/formatDate';
import { ExecutiveSummarySchema } from 'openapi';

const getRandomColor = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add a sample screenshot so we can take a look at the colors that got generated? In other words I'd like to see if the color choice is smart enough to avoid very similar colors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. This is intended to be temporary. I want to do another iteration on how the colors are selected, but for now this was an acceptable tradeoff:

Skjermbilde 2024-01-30 kl  14 46 10

* See `gen:api` script in package.json
*/

export type ExecutiveSummarySchemaProjectFlagTrendsItem = {
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend running it again one more time to get health and time to production that got added a second ago :) We'll avoid another orval run in future

theme: Theme,
flagTrends: ExecutiveSummarySchema['projectFlagTrends'] = [],
) => {
// Group flag trends by project
Copy link
Contributor

Choose a reason for hiding this comment

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

unnecessary comment. variable name is similar

return groups;
}, {});

// Create a dataset for each project
Copy link
Contributor

Choose a reason for hiding this comment

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

unnecessary comment

const date =
item?.chart?.data?.labels?.[item.dataIndex];
return date
? formatDateYMD(date, locationSettings.locale)
Copy link
Contributor

Choose a reason for hiding this comment

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

there should be override with 'UTC'. I think in the weekly scale it makes sense to show UTC time as we did for metrics

@@ -0,0 +1,5 @@
import { lazy } from 'react';

export const FlagsProjectChart = lazy(
Copy link
Contributor

Choose a reason for hiding this comment

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

do we do this for each chart? maybe we can lazy load all charts that show up together

Copy link
Contributor

@kwasniew kwasniew left a comment

Choose a reason for hiding this comment

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

Some comments inside

@FredrikOseberg FredrikOseberg force-pushed the feat/edb-project-flags-widget branch from 04e90be to 04ca10d Compare January 30, 2024 20:18
@FredrikOseberg FredrikOseberg merged commit aae1d05 into main Jan 31, 2024
12 checks passed
@FredrikOseberg FredrikOseberg deleted the feat/edb-project-flags-widget branch January 31, 2024 07:48
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