Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: create UI badges for labeling beta features#14661

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Parkreiner merged 48 commits intomainfrommes/beta-badges
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
48 commits
Select commitHold shift + click to select a range
f843f23
chore: finish draft work for FeatureBadge component
ParkreinerSep 12, 2024
43874a4
fix: add visually-hidden helper text for screen readers
ParkreinerSep 12, 2024
fb70781
chore: add stories for highlighted state
ParkreinerSep 12, 2024
c2470f9
fix: update base styles
ParkreinerSep 12, 2024
693946f
chore: remove debug display option
ParkreinerSep 12, 2024
c2d7cda
Merge branch 'main' into mes/beta-badges
ParkreinerSep 13, 2024
129613b
chore: update Popover to propagate events
ParkreinerSep 13, 2024
6adea6b
wip: commit progress on FeatureBadge update
ParkreinerSep 13, 2024
d4455a8
wip: commit more progress
ParkreinerSep 13, 2024
8ae71d3
chore: update tag definitions to satify Biome
ParkreinerSep 13, 2024
0ad68af
chore: update all colors for preview role
ParkreinerSep 13, 2024
781a609
fix: make sure badge shows as hovered while inside tooltip
ParkreinerSep 13, 2024
a981864
wip: commit progress on adding story for controlled variant
ParkreinerSep 13, 2024
f47d059
fix: sort imports
ParkreinerSep 16, 2024
ad61763
refactor: change component API to be more obvious/ergonomic
ParkreinerSep 16, 2024
6e16aaa
fix: add biome-ignore comments to more base files
ParkreinerSep 16, 2024
6a19b61
fix: update import order again
ParkreinerSep 16, 2024
a233867
chore: revert biome-ignore comment
ParkreinerSep 16, 2024
8cbe639
Merge branch 'main' into mes/beta-badges
ParkreinerSep 17, 2024
7e1ec68
chore: update body text for tooltip
ParkreinerSep 17, 2024
1b58e4d
chore: update dark preivew role to use sky palette
ParkreinerSep 17, 2024
ebc5397
chore: update color palettes for light/darkBlue themes
ParkreinerSep 17, 2024
a9b6897
chore: add beta badge to organizations subheader
ParkreinerSep 17, 2024
31e1fa7
chore: add beta badge to organizations settings page
ParkreinerSep 17, 2024
e16b140
chore: beef up font weight for form header
ParkreinerSep 17, 2024
3aeb3c0
fix: update text contrast for org menu list
ParkreinerSep 17, 2024
71323ac
chore: add beta badge to deployment dropdown
ParkreinerSep 17, 2024
da31c84
fix: run biome on imports
ParkreinerSep 17, 2024
c7308c3
chore: remove API for controlling FeatureBadge hover styling externally
ParkreinerSep 17, 2024
230aa1d
chore: add xs size for badge
ParkreinerSep 17, 2024
fb4b734
fix: update font weight for xs feature badges
ParkreinerSep 18, 2024
5a7bbd3
chore: add beta badges to all org headers
ParkreinerSep 18, 2024
9521f25
Merge branch 'main' into mes/beta-badges
ParkreinerSep 18, 2024
6638942
fix: turn badges and tooltips into separate concerns
ParkreinerSep 18, 2024
9a18e51
fix: update hover styling
ParkreinerSep 18, 2024
b093a99
docs: update wording on comment
ParkreinerSep 18, 2024
9647fc6
fix: apply formatting
ParkreinerSep 18, 2024
0197466
chore: rename FeatureBadge to FeatureStageBadge
ParkreinerSep 18, 2024
fb86964
refactor: redefine FeatureStageBadge
ParkreinerSep 20, 2024
0f64533
chore: update stories
ParkreinerSep 20, 2024
6a2cfcf
fix: add blur behavior to popover
ParkreinerSep 20, 2024
eb2b1c2
chore: revert theme colors
ParkreinerSep 20, 2024
0b46eca
chore: create featureStage branding namespace
ParkreinerSep 20, 2024
4302b3d
fix: make sure cleanup function is set up properly
ParkreinerSep 20, 2024
be8121e
docs: update wording on comment for clarity
ParkreinerSep 20, 2024
1e5d62b
Merge branch 'main' into mes/beta-badges
ParkreinerSep 20, 2024
a824404
Merge branch 'main' into mes/beta-badges
ParkreinerSep 20, 2024
39daf80
refactor: move styles down
ParkreinerSep 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
chore: rename FeatureBadge to FeatureStageBadge
  • Loading branch information
@Parkreiner
Parkreiner committedSep 18, 2024
commit01974669ed2c4aa00e815a1c891c00931da26b3c
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
import type { Meta, StoryObj } from "@storybook/react";
import {FeatureBadge } from "./FeatureBadge";
import {FeatureStageBadge } from "./FeatureStageBadge";

const meta: Meta<typeofFeatureBadge> = {
title: "components/FeatureBadge",
component:FeatureBadge,
const meta: Meta<typeofFeatureStageBadge> = {
title: "components/FeatureStageBadge",
component:FeatureStageBadge,
args: {
type: "beta",
},
};

export default meta;
type Story = StoryObj<typeofFeatureBadge>;
type Story = StoryObj<typeofFeatureStageBadge>;

export const SmallInteractiveBeta: Story = {
args: {
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@ import { docs } from "utils/docs";
* All types of feature that we are currently supporting. Defined as record to
* ensure that we can't accidentally make typos when writing the badge text.
*/
constfeatureBadgeTypes = {
constfeatureStageBadgeTypes = {
beta: "beta",
experimental: "experimental",
} as const satisfies Record<string, ReactNode>;
Expand DownExpand Up@@ -84,15 +84,15 @@ const styles = {
},
} as const satisfies Record<string, Interpolation<Theme>>;

typeFeatureBadgeProps = Readonly<
typeFeatureStageBadgeProps = Readonly<
Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
type: keyof typeoffeatureBadgeTypes;
type: keyof typeoffeatureStageBadgeTypes;
size?: "xs" | "sm" | "lg";
variant: "interactive" | "static";
}
>;

export constFeatureBadge: FC<FeatureBadgeProps> = ({
export constFeatureStageBadge: FC<FeatureStageBadgeProps> = ({
type,
size = "sm",
variant = "interactive",
Expand All@@ -117,7 +117,7 @@ export const FeatureBadge: FC<FeatureBadgeProps> = ({
return () => window.removeEventListener("blur", onWindowBlur);
}, []);

const featureType =featureBadgeTypes[type];
const featureType =featureStageBadgeTypes[type];
const showBadgeHoverStyle =
variant === "interactive" && (isBadgeHovering || isTooltipHovering);

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@ import { organizationPermissions } from "api/queries/organizations";
import { deleteOrganizationRole, organizationRoles } from "api/queries/roles";
import type { Role } from "api/typesGenerated";
import { DeleteDialog } from "components/Dialogs/DeleteDialog/DeleteDialog";
import {FeatureBadge } from "components/FeatureBadge/FeatureBadge";
import {FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";
import { displayError, displaySuccess } from "components/GlobalSnackbar/utils";
import { Loader } from "components/Loader/Loader";
import { SettingsHeader } from "components/SettingsHeader/SettingsHeader";
Expand DownExpand Up@@ -67,7 +67,9 @@ export const CustomRolesPage: FC = () => {
<SettingsHeader
title="Custom Roles"
description="Manage custom roles for this organization."
badges={<FeatureBadge type="beta" variant="interactive" size="lg" />}
badges={
<FeatureStageBadge type="beta" variant="interactive" size="lg" />
}
/>
{permissions.assignOrgRole && isCustomRolesEnabled && (
<Button component={RouterLink} startIcon={<AddIcon />} to="create">
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,7 @@ import { groupsByOrganization } from "api/queries/groups";
import { organizationPermissions } from "api/queries/organizations";
import type { Organization } from "api/typesGenerated";
import { EmptyState } from "components/EmptyState/EmptyState";
import {FeatureBadge } from "components/FeatureBadge/FeatureBadge";
import {FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";
import { displayError } from "components/GlobalSnackbar/utils";
import { Loader } from "components/Loader/Loader";
import { SettingsHeader } from "components/SettingsHeader/SettingsHeader";
Expand DownExpand Up@@ -81,7 +81,9 @@ export const GroupsPage: FC = () => {
<SettingsHeader
title="Groups"
description="Manage groups for this organization."
badges={<FeatureBadge type="beta" variant="interactive" size="lg" />}
badges={
<FeatureStageBadge type="beta" variant="interactive" size="lg" />
}
/>
{permissions.createGroup && feats.template_rbac && (
<Button component={RouterLink} startIcon={<GroupAdd />} to="create">
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import AddIcon from "@mui/icons-material/AddOutlined";
import LaunchOutlined from "@mui/icons-material/LaunchOutlined";
import Button from "@mui/material/Button";
import {FeatureBadge } from "components/FeatureBadge/FeatureBadge";
import {FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";
import { SettingsHeader } from "components/SettingsHeader/SettingsHeader";
import { Stack } from "components/Stack/Stack";
import type { FC } from "react";
Expand DownExpand Up@@ -74,7 +74,9 @@ export const IdpSyncPage: FC = () => {
title="IdP Sync"
description="Group and role sync mappings (configured outside Coder)."
tooltip={<IdpSyncHelpTooltip />}
badges={<FeatureBadge type="beta" size="lg" variant="interactive" />}
badges={
<FeatureStageBadge type="beta" size="lg" variant="interactive" />
}
/>
<Stack direction="row" spacing={2}>
<Button
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,7 @@ import type {
} from "api/typesGenerated";
import { ErrorAlert } from "components/Alert/ErrorAlert";
import { AvatarData } from "components/AvatarData/AvatarData";
import {FeatureBadge } from "components/FeatureBadge/FeatureBadge";
import {FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";
import { displayError, displaySuccess } from "components/GlobalSnackbar/utils";
import {
MoreMenu,
Expand DownExpand Up@@ -63,7 +63,9 @@ export const OrganizationMembersPageView: FC<
<div>
<SettingsHeader
title="Members"
badges={<FeatureBadge type="beta" size="lg" variant="interactive" />}
badges={
<FeatureStageBadge type="beta" size="lg" variant="interactive" />
}
/>

<Stack>
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
import Button from "@mui/material/Button";
import type { BuildInfoResponse, ProvisionerDaemon } from "api/typesGenerated";
import {FeatureBadge } from "components/FeatureBadge/FeatureBadge";
import {FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";
import { SettingsHeader } from "components/SettingsHeader/SettingsHeader";
import { Stack } from "components/Stack/Stack";
import { ProvisionerGroup } from "modules/provisioners/ProvisionerGroup";
Expand DownExpand Up@@ -32,7 +32,9 @@ export const OrganizationProvisionersPageView: FC<
>
<SettingsHeader
title="Provisioners"
badges={<FeatureBadge type="beta" variant="interactive" size="lg" />}
badges={
<FeatureStageBadge type="beta" variant="interactive" size="lg" />
}
/>
<Button
endIcon={<OpenInNewIcon />}
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ import type {
} from "api/typesGenerated";
import { ErrorAlert } from "components/Alert/ErrorAlert";
import { DeleteDialog } from "components/Dialogs/DeleteDialog/DeleteDialog";
import {FeatureBadge } from "components/FeatureBadge/FeatureBadge";
import {FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";
import {
FormFields,
FormFooter,
Expand DownExpand Up@@ -69,7 +69,9 @@ export const OrganizationSettingsPageView: FC<
<div>
<SettingsHeader
title="Settings"
badges={<FeatureBadge type="beta" variant="interactive" size="lg" />}
badges={
<FeatureStageBadge type="beta" variant="interactive" size="lg" />
}
/>

{Boolean(error) && !isApiValidationError(error) && (
Expand Down
4 changes: 2 additions & 2 deletionssite/src/pages/ManagementSettingsPage/SidebarView.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@ import type {
Experiments,
Organization,
} from "api/typesGenerated";
import {FeatureBadge } from "components/FeatureBadge/FeatureBadge";
import {FeatureStageBadge } from "components/FeatureStageBadge/FeatureStageBadge";
import { Loader } from "components/Loader/Loader";
import { Sidebar as BaseSidebar } from "components/Sidebar/Sidebar";
import { Stack } from "components/Stack/Stack";
Expand DownExpand Up@@ -203,7 +203,7 @@ const OrganizationsSettingsNavigation: FC<
}}
>
<h2 css={styles.sidebarHeader}>Organizations</h2>
<FeatureBadge type="beta" variant="interactive" size="sm" />
<FeatureStageBadge type="beta" variant="interactive" size="sm" />
</header>

{permissions.createOrganization && (
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp