-
Notifications
You must be signed in to change notification settings - Fork 44
migrate(admin): SDK admin and SDK app to Apsara v1 (rc.6) #1600
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
base: main
Are you sure you want to change the base?
Changes from 7 commits
dcc92f6
c4beddf
9f95dc3
2cecb30
756a9fe
3a28d51
89cb1c5
7e6601c
2a2b9b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,10 @@ | |||||||||||||
| width: 220px !important; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| .sidebar :global(.sidebar-module_main__qDvo4) { | ||||||||||||||
| gap: var(--rs-space-1); | ||||||||||||||
| } | ||||||||||||||
|
Comment on lines
+9
to
+11
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid targeting CSS Module hashed class names directly. The selector Consider using a stable selector approach: a data attribute, semantic class, or direct child combinator instead. ♻️ Suggested alternativesOption 1: Use a data attribute on the target element -.sidebar :global(.sidebar-module_main__qDvo4) {
+.sidebar [data-sidebar-main] {
gap: var(--rs-space-1);
}Then add Option 2: Use a direct child selector (if structure allows) -.sidebar :global(.sidebar-module_main__qDvo4) {
+.sidebar > .main {
gap: var(--rs-space-1);
}📝 Committable suggestion
Suggested change
🧰 Tools🪛 Stylelint (17.11.0)[error] 9-9: Unknown pseudo-class selector ":global" (selector-pseudo-class-no-unknown) (selector-pseudo-class-no-unknown) |
||||||||||||||
|
|
||||||||||||||
| .sidebar-group { | ||||||||||||||
| margin-top: var(--rs-space-5); | ||||||||||||||
| } | ||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import React from "react"; | ||
| import { Flex, Text } from "@raystack/apsara"; | ||
| import { Flex, Text } from "@raystack/apsara-v1"; | ||
| import { Link } from "react-router-dom"; | ||
| import styles from "./page-header.module.css"; | ||
| export type PageHeaderTypes = { | ||
|
|
@@ -25,8 +25,8 @@ export default function PageHeader({ | |
| style={{ padding: "16px 24px", ...style }} | ||
| {...props} | ||
| > | ||
| <Flex align="center" gap="medium"> | ||
| <Flex align="center" gap="small" className={styles.breadcrumb}> | ||
| <Flex align="center" gap={5}> | ||
| <Flex align="center" gap={3} className={styles.breadcrumb}> | ||
| <Text style={{ fontSize: "14px", fontWeight: "500" }}>{title}</Text> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use Text props instead of inline styles
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| {breadcrumb.map((item) => ( | ||
| <Link | ||
|
|
@@ -35,13 +35,13 @@ export default function PageHeader({ | |
| style={{ display: "flex", flexDirection: "row", gap: "8px" }} | ||
| > | ||
| <Flex align="center"> | ||
| <Text size={1}>{item.name}</Text> | ||
| <Text size="mini">{item.name}</Text> | ||
| </Flex> | ||
| </Link> | ||
| ))} | ||
| </Flex> | ||
| </Flex> | ||
| <Flex gap="small">{children}</Flex> | ||
| <Flex gap={3}>{children}</Flex> | ||
| </Flex> | ||
| ); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apps/admindon't need theapsara-v1alias, it will work fin with normalapsaraimportThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done