Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d05c3fc
chore(shared): align MedalBadgeIcon with IconPrimary outlined convention
tsahimatsliah May 3, 2026
76b6f28
feat(shared): migrate every engagement bar to CardAction / CardActionBar
tsahimatsliah May 3, 2026
528bb74
fix(shared): keep static aria-label on engagement-bar upvote/downvote…
tsahimatsliah May 3, 2026
4bd974e
fix(shared): polish post-detail engagement bar and feed-card counters
tsahimatsliah May 3, 2026
f501b9c
fix(shared): unblock strict typecheck CI for buttons-v2 chain
tsahimatsliah May 3, 2026
0a202db
chore(scripts): externalise buttons-v2 migration strict skip list
tsahimatsliah May 3, 2026
085e468
fix(buttons-v2): drop pressed bg + restore v1 icon-size scale
tsahimatsliah May 3, 2026
9b30cd1
fix(buttons-v2): tighten icon-to-label gap to v1 baseline
tsahimatsliah May 3, 2026
d38c33a
feat(shared): migrate every v1 Button caller in packages/shared to Bu…
tsahimatsliah May 3, 2026
218e601
feat: migrate every v1 Button caller in packages/webapp + packages/ex…
tsahimatsliah May 3, 2026
a798f53
chore(buttons): finish v2 cutover, delete v1, enable lint rule
tsahimatsliah May 3, 2026
febbdd9
fix(shared): use outlined OpenLinkIcon on Read article button
tsahimatsliah May 4, 2026
de9dfa9
fix(shared): pin sidebar expand toggle icon to 16px
tsahimatsliah May 4, 2026
0651345
feat(shared): post-detail action bar — icon on right
tsahimatsliah May 4, 2026
84c87b8
fix(shared): profile cover edit button — apply Float variant
tsahimatsliah May 4, 2026
3ea7430
Revert "feat(shared): post-detail action bar — icon on right"
tsahimatsliah May 4, 2026
0f36bf3
fix(buttons-v2): tighten icon-side horizontal padding
tsahimatsliah May 4, 2026
4370c69
feat(tags): unified TagChip — separator + follow/unfollow action
tsahimatsliah May 4, 2026
580792b
feat(buttons): migrate remaining raw <button> elements to ButtonV2
tsahimatsliah May 4, 2026
792deeb
Merge remote-tracking branch 'origin/main' into feat/buttons-v2-migra…
tsahimatsliah May 4, 2026
a862a5c
fix(shared): SharePostContent — Read post icon on left
tsahimatsliah May 4, 2026
430b013
fix(buttons-v2): tighten icon-side padding to 1:2 ratio
tsahimatsliah May 4, 2026
c7ecfa6
fix(tags): drop unfollow × — followed chips read as plain labels
tsahimatsliah May 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 26 additions & 1 deletion packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ module.exports = {
'plugin:prettier/recommended',
'plugin:react-hooks/recommended',
],
plugins: ['prettier', 'tailwindcss', 'react-hooks', 'unused-imports'],
plugins: [
'prettier',
'tailwindcss',
'react-hooks',
'unused-imports',
'@dailydotdev/daily-dev-eslint-rules',
],
parserOptions: {
project: './tsconfig.eslint.json',
ecmaVersion: 2020,
Expand Down Expand Up @@ -172,5 +178,24 @@ module.exports = {
},
],
'@typescript-eslint/explicit-module-boundary-types': "off",
'@dailydotdev/daily-dev-eslint-rules/no-raw-button-class': 'error',
},
overrides: [
{
// The button source itself + the Tailwind plugin that defines the
// tokens are the only places allowed to spell out raw `btn-*` /
// `btn-v2-*` class names.
files: [
'**/components/buttons/ButtonV2.tsx',
'**/components/buttons/CardAction.tsx',
'**/components/buttons/CardActionBar.tsx',
'**/components/buttons/common.ts',
'**/components/buttons/Buttons.mdx',
'**/tailwind/buttons-v2.ts',
],
rules: {
'@dailydotdev/daily-dev-eslint-rules/no-raw-button-class': 'off',
},
},
],
};
44 changes: 43 additions & 1 deletion packages/eslint-rules/lib/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@
// Lazy plugin loader. The `no-custom-color` rule used to require the
// shared Tailwind config at module load, which now lives as a TS file
// and breaks plain `require`. Lazy-loading isolates each rule so a
// broken rule does not bring down the whole plugin.
const lazy = (loader) => {
let cached;
return (...args) => {
if (!cached) {
cached = loader();
}
return cached.create ? cached.create(...args) : cached;
};
};

const wrapAsRule = (loader) => ({
create: lazy(loader),
meta: undefined,
get _meta() {
if (!this.__resolved) {
this.__resolved = loader();
}
return this.__resolved.meta;
},
});

module.exports.rules = {
'no-custom-color': require('./rules/no-custom-color'),
'no-custom-color': {
create(...args) {
const rule = require('./rules/no-custom-color');
return rule.create(...args);
},
meta: {
type: 'problem',
docs: {
description: 'Disallow non-design-system color tokens.',
recommended: false,
},
schema: [],
},
},
'no-raw-button-class': require('./rules/no-raw-button-class'),
};

// expose lazy helpers for tests / consumers if they want them
module.exports._lazy = lazy;
module.exports._wrapAsRule = wrapAsRule;
6 changes: 3 additions & 3 deletions packages/extension/src/companion/CompanionContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import {
import '@dailydotdev/shared/src/styles/globals.css';
import type { PostBootData } from '@dailydotdev/shared/src/lib/boot';
import {
Button,
ButtonV2,
ButtonColor,
ButtonVariant,
} from '@dailydotdev/shared/src/components/buttons/Button';
} from '@dailydotdev/shared/src/components/buttons/ButtonV2';
import { useCopyLink } from '@dailydotdev/shared/src/hooks/useCopy';
import { useUpvoteQuery } from '@dailydotdev/shared/src/hooks/useUpvoteQuery';
import { postLogEvent } from '@dailydotdev/shared/src/lib/feed';
Expand Down Expand Up @@ -74,7 +74,7 @@ export default function CompanionContent({
content="Copy link"
className="whitespace-nowrap shadow-2"
>
<Button
<ButtonV2
icon={<CopyIcon />}
variant={ButtonVariant.Tertiary}
color={copying ? ButtonColor.Avocado : undefined}
Expand Down
14 changes: 7 additions & 7 deletions packages/extension/src/companion/CompanionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { ReactElement } from 'react';
import React, { useContext, useEffect, useRef, useState } from 'react';
import classNames from 'classnames';
import {
Button,
ButtonV2,
ButtonColor,
ButtonVariant,
} from '@dailydotdev/shared/src/components/buttons/Button';
} from '@dailydotdev/shared/src/components/buttons/ButtonV2';
import {
BookmarkIcon,
DiscussIcon as CommentIcon,
Expand Down Expand Up @@ -363,7 +363,7 @@ export default function CompanionMenu({
}
className={tooltipContainerClassName}
>
<Button
<ButtonV2
icon={
<UpvoteIcon secondary={post?.userState?.vote === UserVote.Up} />
}
Expand All @@ -378,7 +378,7 @@ export default function CompanionMenu({
content="Add comment"
className={tooltipContainerClassName}
>
<Button
<ButtonV2
variant={ButtonVariant.Tertiary}
color={ButtonColor.BlueCheese}
pressed={post?.commented}
Expand All @@ -402,7 +402,7 @@ export default function CompanionMenu({
content={`${post?.bookmarked ? 'Remove from' : 'Save to'} bookmarks`}
className={tooltipContainerClassName}
>
<Button
<ButtonV2
icon={<BookmarkIcon secondary={post?.bookmarked} />}
pressed={post?.bookmarked}
onClick={toggleBookmark}
Expand All @@ -415,7 +415,7 @@ export default function CompanionMenu({
content="Share post"
className={tooltipContainerClassName}
>
<Button
<ButtonV2
variant={ButtonVariant.Tertiary}
color={ButtonColor.Cabbage}
onClick={onShare}
Expand All @@ -427,7 +427,7 @@ export default function CompanionMenu({
tooltip={{ content: 'More options', side: 'left' }}
asChild
>
<Button variant={ButtonVariant.Tertiary} icon={<MenuIcon />} />
<ButtonV2 variant={ButtonVariant.Tertiary} icon={<MenuIcon />} />
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuOptions options={options} />
Expand Down
8 changes: 4 additions & 4 deletions packages/extension/src/companion/CompanionPermission.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
Button,
ButtonV2,
ButtonSize,
ButtonVariant,
} from '@dailydotdev/shared/src/components/buttons/Button';
} from '@dailydotdev/shared/src/components/buttons/ButtonV2';
import classed from '@dailydotdev/shared/src/lib/classed';
import { companionExplainerVideo } from '@dailydotdev/shared/src/lib/constants';
import type { ReactElement, Ref } from 'react';
Expand Down Expand Up @@ -37,7 +37,7 @@ const CompanionPermissionComponent = (
>
{description}
</p>
<Button
<ButtonV2
className="mt-1 w-[12.5rem]"
onClick={() =>
requestContentScripts({
Expand All @@ -48,7 +48,7 @@ const CompanionPermissionComponent = (
variant={ButtonVariant.Primary}
>
{button}
</Button>
</ButtonV2>
</CompanionSection>
<CompanionSection>
<a
Expand Down
6 changes: 3 additions & 3 deletions packages/extension/src/companion/CompanionPopupButton.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { ReactElement } from 'react';
import React, { useState, useEffect } from 'react';
import {
Button,
ButtonV2,
ButtonVariant,
} from '@dailydotdev/shared/src/components/buttons/Button';
} from '@dailydotdev/shared/src/components/buttons/ButtonV2';
import SimpleTooltip from '@dailydotdev/shared/src/components/tooltips/SimpleTooltip';
import { AppIcon as CompanionIcon } from '@dailydotdev/shared/src/components/icons';
import { ExperimentWinner } from '@dailydotdev/shared/src/lib/featureValues';
Expand Down Expand Up @@ -67,7 +67,7 @@ export const CompanionPopupButton = (): ReactElement => {
visible={showCompanionPermission}
onClickOutside={closeCompanionPopupButton}
>
<Button
<ButtonV2
onClick={onButtonClick}
variant={ButtonVariant.Float}
className="hidden laptop:flex"
Expand Down
6 changes: 3 additions & 3 deletions packages/extension/src/companion/CompanionToggle.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { ReactElement } from 'react';
import React from 'react';
import {
Button,
ButtonV2,
ButtonVariant,
} from '@dailydotdev/shared/src/components/buttons/Button';
} from '@dailydotdev/shared/src/components/buttons/ButtonV2';
import { ArrowIcon } from '@dailydotdev/shared/src/components/icons';
import LogoIcon from '@dailydotdev/shared/src/svg/LogoIcon';
import classNames from 'classnames';
Expand Down Expand Up @@ -39,7 +39,7 @@ function CompanionToggle({
content={companionState ? 'Close summary' : 'Open summary'}
className={tooltipContainerClassName}
>
<Button
<ButtonV2
variant={
companionState ? ButtonVariant.Secondary : ButtonVariant.Tertiary
}
Expand Down
10 changes: 7 additions & 3 deletions packages/extension/src/newtab/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ import { useExtensionContext } from '@dailydotdev/shared/src/contexts/ExtensionC
import { useConsoleLogo } from '@dailydotdev/shared/src/hooks/useConsoleLogo';
import { DndContextProvider } from '@dailydotdev/shared/src/contexts/DndContext';
import { structuredCloneJsonPolyfill } from '@dailydotdev/shared/src/lib/structuredClone';
import {
ButtonV2,
ButtonVariant,
} from '@dailydotdev/shared/src/components/buttons/ButtonV2';
import { useOnboardingActions } from '@dailydotdev/shared/src/hooks/auth';
import { useCheckCoresRole } from '@dailydotdev/shared/src/hooks/useCheckCoresRole';
import { ShortcutsProvider } from '@dailydotdev/shared/src/features/shortcuts/contexts/ShortcutsProvider';
Expand Down Expand Up @@ -57,13 +61,13 @@ const feedErrorFallback: ReactElement = (
<div className="flex min-h-dvh w-full flex-col items-center justify-center gap-4 px-6 text-center">
<h1 className="typo-title2">Something went wrong</h1>
<p className="text-text-tertiary">Please reload this page to continue.</p>
<button
<ButtonV2
type="button"
className="btn-primary px-5 py-2"
variant={ButtonVariant.Primary}
onClick={() => window.location.reload()}
>
Reload
</button>
</ButtonV2>
</div>
);

Expand Down
19 changes: 11 additions & 8 deletions packages/extension/src/newtab/DndModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import React, { useState } from 'react';
import { format } from 'date-fns';
import { Radio } from '@dailydotdev/shared/src/components/fields/Radio';
import {
Button,
ButtonV2,
ButtonVariant,
} from '@dailydotdev/shared/src/components/buttons/Button';
} from '@dailydotdev/shared/src/components/buttons/ButtonV2';
import { Dropdown } from '@dailydotdev/shared/src/components/fields/Dropdown';
import { TextField } from '@dailydotdev/shared/src/components/fields/TextField';
import type { ModalProps } from '@dailydotdev/shared/src/components/modals/common/Modal';
Expand Down Expand Up @@ -101,20 +101,23 @@ export default function DndModal({
<Modal.Footer justify={!isActive ? Justify.End : Justify.Between}>
{isActive ? (
<>
<Button variant={ButtonVariant.Secondary} onClick={onRequestClose}>
<ButtonV2
variant={ButtonVariant.Secondary}
onClick={onRequestClose}
>
Keep paused
</Button>
<Button
</ButtonV2>
<ButtonV2
variant={ButtonVariant.Primary}
onClick={() => onDndSettings(null)}
>
Unpause now
</Button>
</ButtonV2>
</>
) : (
<Button variant={ButtonVariant.Primary} onClick={handleSubmit}>
<ButtonV2 variant={ButtonVariant.Primary} onClick={handleSubmit}>
Done
</Button>
</ButtonV2>
)}
</Modal.Footer>
</Modal>
Expand Down
12 changes: 6 additions & 6 deletions packages/extension/src/newtab/HijackingLoginStrip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import type { ReactElement } from 'react';
import React from 'react';
import classNames from 'classnames';
import {
Button,
ButtonV2,
ButtonVariant,
} from '@dailydotdev/shared/src/components/buttons/Button';
} from '@dailydotdev/shared/src/components/buttons/ButtonV2';
import { useAuthContext } from '@dailydotdev/shared/src/contexts/AuthContext';
import { useLogContext } from '@dailydotdev/shared/src/contexts/LogContext';
import { AuthTriggers } from '@dailydotdev/shared/src/lib/auth';
Expand Down Expand Up @@ -52,7 +52,7 @@ export default function HijackingLoginStrip(): ReactElement {
: 'You still have a few onboarding steps left. Finish them to unlock the full experience.'}
</p>
{isLoggedOut ? (
<Button
<ButtonV2
type="button"
variant={ButtonVariant.Primary}
className="mt-4 w-fit"
Expand All @@ -66,17 +66,17 @@ export default function HijackingLoginStrip(): ReactElement {
}}
>
Log in to continue
</Button>
</ButtonV2>
) : (
<Button
<ButtonV2
tag="a"
href={onboardingHref}
variant={ButtonVariant.Primary}
className="mt-4 w-fit"
onClick={logHijackingClick}
>
Continue onboarding
</Button>
</ButtonV2>
)}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import {
} from '@dailydotdev/shared/src/lib/image';
import { PlusIcon } from '@dailydotdev/shared/src/components/icons';
import {
Button,
ButtonV2,
ButtonSize,
ButtonVariant,
} from '@dailydotdev/shared/src/components/buttons/Button';
} from '@dailydotdev/shared/src/components/buttons/ButtonV2';
import type { PropsWithChildren, ReactElement } from 'react';
import React from 'react';
import { useThemedAsset } from '@dailydotdev/shared/src/hooks/utils';
Expand Down Expand Up @@ -75,20 +75,20 @@ export const ShortcutGetStarted = ({
</ShortcutItemPlaceholder>
</div>
<div className="flex gap-4">
<Button
<ButtonV2
onClick={() => completeActionThenFire(onCustomLinksClick)}
size={ButtonSize.Medium}
variant={ButtonVariant.Primary}
>
Add shortcuts
</Button>
<Button
</ButtonV2>
<ButtonV2
onClick={() => completeActionThenFire(onTopSitesClick)}
size={ButtonSize.Medium}
variant={ButtonVariant.Float}
>
Skip for now
</Button>
</ButtonV2>
</div>
</div>
);
Expand Down
Loading
Loading