Skip to content

Commit

Permalink
clean up unnecessary id and data-attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
kuroji-fusky committed Oct 23, 2023
1 parent 5a77bcd commit 09db949
Show file tree
Hide file tree
Showing 41 changed files with 43 additions and 112 deletions.
1 change: 0 additions & 1 deletion apps/website/src/app/dashboard/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export default function DashboardLayout({
return (
<div className="flex">
<nav
data-d-nav-drawer=""
style={{ width: 250 }}
className="sticky top-16 [align-self:flex-start] h-[calc(100dvh-4rem)] border-r border-r-separator"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function generateMetadata(
export default function GalleryPage({ params }: SlugRouteProps) {
return (
<>
<div data-profile-contents="" className="py-4 max-w-screen-2xl">
<div className="py-4 max-w-screen-2xl">
<div className="grid py-16 text-center border rounded-md place-items-center border-error w-full prose-p:mx-auto prose-p:leading-6 prose-p:mt-2">
<div>
<img src="/img/hero/ozzy-banner.png" alt="" className="w-4 h-4" />
Expand Down
6 changes: 3 additions & 3 deletions apps/website/src/app/profile/[profile]/(overview)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ export async function generateMetadata(

export default function Page() {
return (
<div data-group-mode="visual" className="flex w-full gap-3">
<div id="l-seperator" className="flex-shrink-0 w-1/2"></div>
<div id="r-seperator" className="flex-shrink-0 w-1/2">
<div className="flex w-full gap-3">
<div className="flex-shrink-0 w-1/2"></div>
<div className="flex-shrink-0 w-1/2">
<Group>
<Group.Header>About Username</Group.Header>
<Group.HeaderButtons>
Expand Down
19 changes: 6 additions & 13 deletions apps/website/src/app/profile/[profile]/CharacterMasthead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function CharacterMasthead({
}, [setPeeking])

return (
<div id="masthead-root" className="contents">
<div className="contents">
<div ref={profileDetailsRef} className="px-12 mx-auto max-w-screen-2xl">
<Button
href={`/@${owner}`}
Expand Down Expand Up @@ -88,7 +88,7 @@ export default function CharacterMasthead({
<div className="flex justify-between">
<h2 className="text-3xl not-prose font-inter font-bold flex items-center gap-x-1.5">
<span>{name}</span>
<span id="badge-shelf" aria-hidden>
<span aria-hidden>
{/* <Badge
label="Visible to followers"
varient="default"
Expand All @@ -114,24 +114,17 @@ export default function CharacterMasthead({
</div>
{/* layer 2 - handles and followers */}
<div className="flex gap-x-3.5">
<span id="user-handle" className="font-semibold text-700">
{species}
</span>

<span id="user-followers" className="text-700">
{pronouns}
</span>
<span className="font-semibold text-700">{species}</span>
<span className="text-700">{pronouns}</span>
</div>
{/* layer 3 - Fursona Info */}
<div className="flex gap-x-2.5 pt-1.5">
<span id="user-followers" className="text-700">
Created by {creator}
</span>
<span className="text-700">Created by {creator}</span>
</div>
{/* layer 3 - Toyhouse/Notices */}
<div className="flex gap-x-2.5 pt-1.5">
{/* TODO: Temporary */}
{/* <span id="user-followers" className="text-700">
{/* <span className="text-700">
{toyhouseLink && (
<span className="flex flex-row items-center">
<InfoIcon size={16} className="mr-2" /> This character has
Expand Down
17 changes: 5 additions & 12 deletions apps/website/src/app/profile/[profile]/ProfileMasthead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ export default function ProfileMasthead({
}, [setPeeking])

return (
<div id="masthead-root" className="contents">
<div className="contents">
{/* Banner */}
{/* <div
data-edit-banner-layout=""
className="absolute inset-0 grid place-items-center z-[4]"
>
<span>Change banner</span>
Expand Down Expand Up @@ -116,7 +115,7 @@ export default function ProfileMasthead({
<div className="flex justify-between">
<h2 className="text-3xl not-prose font-inter font-bold flex items-center gap-x-1.5">
<span>Username</span>
<span id="badge-shelf" aria-hidden></span>
<span aria-hidden></span>
</h2>
<div className="flex items-start gap-x-2.5 relative z-2">
<Button
Expand Down Expand Up @@ -153,19 +152,13 @@ export default function ProfileMasthead({
</div>
{/* layer 2 - handles and followers */}
<div className="flex gap-x-3.5">
<span id="user-handle" className="font-semibold text-700">
@{handle}
</span>
<span className="font-semibold text-700">@{handle}</span>
<span className="inline-flex items-center font-semibold gap-x-1 bg-error px-1 text-xs rounded-md">
<AlertTriangleIcon size={17} />
<span>NSFW</span>
</span>
<span id="user-followers" className="text-700">
69 followers
</span>
<span id="user-following" className="text-700">
21 following
</span>
<span className="text-700">69 followers</span>
<span className="text-700">21 following</span>
</div>
{/* layer 3 - socials */}
<div className="flex gap-x-2.5 pt-1.5">
Expand Down
5 changes: 1 addition & 4 deletions apps/website/src/components/layouts/global/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,7 @@ export default function Footer() {
))}
</div>
</section>
<section
id="copyright"
className="p-4 text-center text-sm text-subtext prose-p:my-4"
>
<section className="p-4 text-center text-sm text-subtext prose-p:my-4">
<p>
{`MyFursona is an open source project licensed under Apache License 2.0.
© 2022-${new Date().getFullYear()} Fusky Labs Software Ltd.`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function NavbarProfilePeek() {
}

return (
<div id="profile-peek" className="relative flex items-center">
<div className="relative flex items-center">
<Link href="/" aria-label="Home" draggable={false}>
<MyFursona logoOnly size={0.7} />
</Link>
Expand Down Expand Up @@ -64,7 +64,6 @@ export default function NavbarProfilePeek() {
</motion.div>
{/* User avatar and handle */}
<motion.div
id="handle-wrapper"
variants={peekVariants}
initial={"down"}
animate={handlePeekRoutes && !isPeeking ? "visible" : "down"}
Expand Down
1 change: 0 additions & 1 deletion apps/website/src/components/ui/BuiImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export default function BuiImage({

return (
<div
id="img-shield"
className="relative before:absolute before:inset-0 before:z-[2]"
style={{
aspectRatio,
Expand Down
1 change: 0 additions & 1 deletion apps/website/src/components/ui/BuiLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default function BuiLink({

return (
<Link
id="biro-ui-link"
className="underline text-blue-400 hover:text-blue-500 inline-flex items-center w-fit"
href={href as unknown as UrlObject}
target={hasHTTPInUrl ? "_blank" : undefined}
Expand Down
1 change: 0 additions & 1 deletion apps/website/src/components/ui/Buttons/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default function Avatar({
}) {
return (
<div
id="avatar"
aria-label={username}
style={{ height: `${size}px`, width: `${size}px` }}
className={className ?? "overflow-hidden rounded-full"}
Expand Down
1 change: 0 additions & 1 deletion apps/website/src/components/ui/Buttons/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ const Button = forwardRef(
return (
<DynamicElement
ref={ref as React.LegacyRef<HTMLAnchorElement & HTMLButtonElement>}
data-button-variant-debug={className ? "custom" : variant ?? "primary"}
// @ts-ignore
href={href ?? undefined}
type={!href ? type ?? "button" : undefined}
Expand Down
6 changes: 1 addition & 5 deletions apps/website/src/components/ui/Cards/ColorPalette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ export default function ColorPalette({
height?: number | string
}) {
return (
<ul
data-color-palette=""
className="grid grid-flow-col"
style={{ width, height }}
>
<ul className="grid grid-flow-col" style={{ width, height }}>
{palette.map(({ color, name }, index) => {
return (
<li
Expand Down
5 changes: 1 addition & 4 deletions apps/website/src/components/ui/Cards/CommissionListing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ export default function CommissionsListing({
description: string
}) {
return (
<div
id="listing"
className="flex flex-col justify-start items-center w-fit my-4"
>
<div className="flex flex-col justify-start items-center w-fit my-4">
<div className="relative w-[568px] h-[156px] rounded-md overflow-hidden">
<div className="hover:scale:90">
<BuiImage src={img} />
Expand Down
5 changes: 3 additions & 2 deletions apps/website/src/components/ui/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function Carousel({
seeAllLink?: string
}) {
return (
<Element id="carousel-root">
<Element>
<div className="flex items-center justify-between gap-x-1 px-3.5 py-2">
<div>{title}</div>
<Button
Expand All @@ -27,7 +27,8 @@ export default function Carousel({
</Button>
</div>
<Separator dir="horizontal" padding="0.25rem" />
<div id="carousel-contents">{children}</div>
{/* Carousel contents */}
<div>{children}</div>
</Element>
)
}
2 changes: 1 addition & 1 deletion apps/website/src/components/ui/Dashboard/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function Group({
children?: React.ReactNode
}) {
return (
<div data-dashboard-group="">
<div>
<h2 className="not-prose font-inter block">{title}</h2>
<div>{children}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/components/ui/Dashboard/GroupNested.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function GroupNested({
children?: React.ReactNode
}) {
return (
<div data-dashboard-nested-group="">
<div>
<h3 className="not-prose block">{title}</h3>
<div>{children}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/components/ui/Dashboard/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function Heading({
buttons?: NonNullable<React.ReactElement>
}) {
return (
<div data-d-heading="" className="flex justify-between items-center">
<div className="flex justify-between items-center">
<span>{title}</span>
<div>{buttons}</div>
</div>
Expand Down
2 changes: 0 additions & 2 deletions apps/website/src/components/ui/Drop/DropZone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export default function DropZone() {
>
<input
type="file"
id="fileInput"
style={{ display: "none" }}
onChange={handleFileInputChange}
/>
Expand All @@ -86,7 +85,6 @@ export default function DropZone() {
>
<input
type="file"
id="fileInput"
style={{ display: "none" }}
onChange={handleFileInputChange}
/>
Expand Down
5 changes: 1 addition & 4 deletions apps/website/src/components/ui/EmptySection/EmptySection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ export default function EmptySection({
icon?: IconType
}) {
return (
<div
id="empty-section-root"
className="grid px-4 py-32 text-center border rounded-md place-items-center border-error prose-p:w-2/3 prose-p:mx-auto prose-p:leading-6 prose-p:mt-2"
>
<div className="grid px-4 py-32 text-center border rounded-md place-items-center border-error prose-p:w-2/3 prose-p:mx-auto prose-p:leading-6 prose-p:mt-2">
<div className="p-4 rounded-lg bg-error-hl">
<Icon size={48} strokeWidth={2} />
</div>
Expand Down
1 change: 0 additions & 1 deletion apps/website/src/components/ui/Field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default function Field({
}) {
return (
<div
id="field"
className={clsx(
"inline-flex flex-col gap-y-1 px-2 py-1.5",
!full ? "w-1/2" : "w-full"
Expand Down
5 changes: 1 addition & 4 deletions apps/website/src/components/ui/Fieldset/Fieldset.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ export default function Fieldset({
description?: NonNullable<React.ReactElement> | string
}) {
return (
<section
id="biro-ui-fieldset"
className="p-6 rounded-lg border border-300 bg-200"
>
<section className="p-6 rounded-lg border border-300 bg-200">
<div>
{heading ? <h5 className="mb-4">{heading}</h5> : null}
{description ? <span>{description}</span> : null}
Expand Down
6 changes: 1 addition & 5 deletions apps/website/src/components/ui/Folders/FolderContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,5 @@ export default function FolderContents({
}: {
children: React.ReactNode
}) {
return (
<div id="folder-contents" className="w-full">
{children}
</div>
)
return <div className="w-full">{children}</div>
}
2 changes: 0 additions & 2 deletions apps/website/src/components/ui/Folders/FolderItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,9 @@ export default function FolderItem({

return (
<div
id="folder-item"
className={clsx(!nestedItem ? "w-full" : "w-full relative")}
aria-expanded={!children ? undefined : isExpand}
// Data attribute for debugging purposes in production
data-has-subitems={!children ? undefined : ""}
{...attributes}
>
<Button
Expand Down
4 changes: 1 addition & 3 deletions apps/website/src/components/ui/Folders/FolderView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ export default function FolderView({
}) {
return (
<FolderViewProvider>
<div id="folder-view-wrapper" className="flex gap-x-4">
{children}
</div>
<div className="flex gap-x-4">{children}</div>
</FolderViewProvider>
)
}
7 changes: 2 additions & 5 deletions apps/website/src/components/ui/Forms/FormWithProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function FormWithProgress({

const FormProgress = () => {
return (
<div id="form-progress-wrapper">
<div>
{progress.map(({ item, isComplete }, i) => (
<div key={i} className="px-5 flex gap-x-4 items-center pt-3 pb-1.5">
<div
Expand Down Expand Up @@ -45,10 +45,7 @@ export default function FormWithProgress({
}

return (
<div
data-biro-ui-form-progress=""
className="flex mx-auto max-w-screen-xl px-9 gap-x-4 mt-12"
>
<div className="flex mx-auto max-w-screen-xl px-9 gap-x-4 mt-12">
<div className="w-1/4 flex-shrink-0">
<aside className="sticky top-24 flex flex-col gap-y-5">
<FormProgress />
Expand Down
3 changes: 2 additions & 1 deletion apps/website/src/components/ui/Forms/InputField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export default function InputField({
spellCheck={false}
/>
</label>
<div data-error-boundary=""></div>
{/* Error boundary */}
<div></div>
</div>
)
}
1 change: 0 additions & 1 deletion apps/website/src/components/ui/GridResponsive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export default function GridResponsive({

return (
<div
id="grid-responsive-wrapper"
style={{
display: "grid",
gridTemplateColumns: `repeat(${constraint}, minmax(${breakpoint}px, 1fr))`
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/components/ui/Group/Comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export default function Comment({
editable?: boolean
favCount?: number
}) {
return <div id="comment">{children}</div>
return <div>{children}</div>
}
1 change: 0 additions & 1 deletion apps/website/src/components/ui/Group/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ export default function GroupContents({
* i.e. "l" for left and "r" for right, ff. by the index number
*/
data-group-placement="l5"
id="group-wrapper"
className="grid grid-cols-[minmax(0,1fr)_auto] grid-rows-[auto_1fr] gap-x-2.5 gap-y-3"
>
{children}
Expand Down
6 changes: 1 addition & 5 deletions apps/website/src/components/ui/Group/GroupButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,5 @@ export default function GroupButtons({
}: {
children: React.ReactNode
}) {
return (
<div id="group-buttons-wrapper" className="flex items-center">
{children}
</div>
)
return <div className="flex items-center">{children}</div>
}
Loading

0 comments on commit 09db949

Please sign in to comment.