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

1198/refactor to align with documentation #1199

Merged
merged 6 commits into from
Mar 5, 2024

Conversation

Ty-ci
Copy link
Contributor

@Ty-ci Ty-ci commented Mar 4, 2024

Refactor code to align with some principles in our documentation (https://bratislava.github.io/frontend/components)

  • Changed interfaces to types
  • Changed named exports in single-component files to default exports
  • Used tailwind-merge to merge classes

@Ty-ci Ty-ci requested a review from radoslavzeman March 4, 2024 14:29
@Ty-ci Ty-ci linked an issue Mar 4, 2024 that may be closed by this pull request
3 tasks
Copy link
Contributor

@radoslavzeman radoslavzeman left a comment

Choose a reason for hiding this comment

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

Look very nice.
Let's watch closely these files:

  • next/backend/ginis/server/api-data.dto.ts
  • next/components/forms/simple-components/Chip.tsx
  • next/components/molecules/sections/general/CalculatorSection/MinimumCalculator.tsx
  • next/components/ui/Radio/Radio.tsx
  • next/global.d.ts

className={cx(
'relative flex w-full max-w-[200px] flex-col transition-all xs:max-w-[320px]',
className={twMerge(
'xs:max-w-[320px] relative flex w-full max-w-[200px] flex-col transition-all',
Copy link
Contributor

Choose a reason for hiding this comment

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

xs:max-w-[320px] can be deleted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

const classNameStyles = cx(
'flex flex-wrap gap-2 rounded-lg border border-dashed border-gray-800 p-4 xs:p-3',
'xs:p-3 flex flex-wrap gap-2 rounded-lg border border-dashed border-gray-800 p-4',
Copy link
Contributor

Choose a reason for hiding this comment

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

xs:p-3 can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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


interface TooltipShowCaseProps {}
type TooltipShowCaseProps = {}
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be removed completely

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -2,9 +2,10 @@ import Markdown from '@components/atoms/Markdown'
import { NumericalListItemObject } from '@components/ui/NumericalListSectionUI/NumericalListSectionUI'
import cx from 'classnames'

import { DashedLine } from '../DashedLine/DashedLine'
import DashedLine from '../DashedLine/DashedLine'
import exp from 'constants'
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

✅ removed (came in probably as an auto import by mistake)

next/global.d.ts Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

I would keep this as interface

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@github-actions github-actions bot added pr: fix & ship 🚢 No additional review needed before merge - some work may be required, if specified in last review and removed pr: needs review 🙏 labels Mar 4, 2024
@radoslavzeman radoslavzeman force-pushed the 1198/Refactor-to-align-with-documentation branch from 6579ca4 to 9d66bfd Compare March 4, 2024 19:56
Copy link

github-actions bot commented Mar 5, 2024

Test build pipeline info 🚀

Changes in the code and tag info:

➡️ Changes in strapi: false

➡️ Changes in next: true

We are going to build 🚢

🔜 next

🥳 Bratiska-cli successfully created an kustomize file.
🥳 Bratiska-cli successfully built an image from path: next/
🥳 Bratiska-cli successfully built an image from path: next/

@Ty-ci Ty-ci merged commit fd824e6 into master Mar 5, 2024
8 checks passed
@Ty-ci Ty-ci deleted the 1198/Refactor-to-align-with-documentation branch March 5, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix & ship 🚢 No additional review needed before merge - some work may be required, if specified in last review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor to align with documentation
2 participants