Skip to content

Commit

Permalink
chore(ui): integrate vite for ui-components (#673)
Browse files Browse the repository at this point in the history
* chore(ui): solve deprecated warnings

* chore(ui): vite transition

* chore(ui): fix storybook

* chore(ui): clean up rollup

* chore(ui): breaking change components types

* chore(ui): rollback app changes

* chore(ui): rollback changes

* chore(ui): add changeset

* chore(ui): fix bug in test

* chore(ui): update BreadcrumbItem tests

* Update .changeset/olive-ties-beam.md

Co-authored-by: Guoda <[email protected]>

* chore(ui): revert props, fix types

* chore(ui): rollback

* chore(template): dismis the default property

---------
fixes #673 
Co-authored-by: Guoda <[email protected]>
  • Loading branch information
barsukov and guoda-puidokaite authored Dec 12, 2024
1 parent d1e3960 commit 3c6ad30
Show file tree
Hide file tree
Showing 61 changed files with 6,991 additions and 5,870 deletions.
5 changes: 5 additions & 0 deletions .changeset/olive-ties-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cloudoperators/juno-ui-components": minor
---

Introduce types, deprecate other components, integrate new build system
2 changes: 1 addition & 1 deletion apps/carbon/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const extensions = [
const App = (props: AppProps) => (
<ErrorBoundary>
<AppShellProvider theme={`${props.theme ? props.theme : "theme-dark"}`}>
<AppShell embedded>
<AppShell embedded fullWidthContent={undefined} sideNavigation={undefined} topNavigation={undefined}>
{/* load styles inside the shadow dom */}
<style>{styles.toString()}</style>
<AppContent extensions={extensions} />
Expand Down
4 changes: 3 additions & 1 deletion apps/carbon/src/components/AppContent/NoExtensionFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { Message } from "@cloudoperators/juno-ui-components"

const NoExtensionFound = () => (
<div className="p-4">
<Message variant="danger">No extension found!</Message>
<Message variant="danger" onDismiss={undefined} text={undefined}>
No extension found!
</Message>
</div>
)

Expand Down
2 changes: 1 addition & 1 deletion apps/carbon/src/components/ErrorBoundary/ErrorFallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React from "react"
import { Message } from "@cloudoperators/juno-ui-components"

const ErrorFallback = ({ error }: { error: Error }) => (
<Message text={error?.message || "An error occurred"} variant="danger" />
<Message text={error?.message || "An error occurred"} variant="danger" onDismiss={undefined} children={undefined} />
)

export default ErrorFallback
2 changes: 2 additions & 0 deletions apps/template/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export const App = (props: AppProps) => {
<AppShell
pageHeader="Converged Cloud | App Template"
embedded={props.embedded === "true" || props.embedded === true}
sideNavigation={null}
topNavigation={null}
>
<ErrorBoundary fallbackRender={fallbackRender}>
<AppContent />
Expand Down
4 changes: 2 additions & 2 deletions apps/template/src/components/AppContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import { Breadcrumb, BreadcrumbItem, Container } from "@cloudoperators/juno-ui-c

import WelcomeView from "./WelcomeView"

const AppContent = () => {
const AppContent = (): JSX.Element => {
return (
<>
<Breadcrumb>
<BreadcrumbItem icon="home" label="Template App Home" />
<BreadcrumbItem icon="home" label="Template App Home" onClick={undefined} />
</Breadcrumb>
<Container py>
<WelcomeView />
Expand Down
2 changes: 1 addition & 1 deletion apps/template/src/components/WelcomeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React from "react"
import { Stack } from "@cloudoperators/juno-ui-components"
import { useWellcomeStore } from "../store"

const WelcomeView = () => {
const WelcomeView = (): JSX.Element => {
const { welcome } = useWellcomeStore()
return (
<Stack alignment="center" distribution="center" direction="vertical" className="my-[10vh]">
Expand Down
Loading

0 comments on commit 3c6ad30

Please sign in to comment.