fix(ui): tab counters 4px lower and further right
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m32s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m32s
Corner counters on tabs (header, task lists, lists, workspace) sat on the tab's top border and close to the text; now -top-0.5 -right-2 with pr-3 on the label. The mobile bottom bar keeps its icon placement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e7851f1257
commit
6d6a35d28d
5 files changed
+17
-17
No files matched your search
+1
-1
@@ -57,7 +57,7 @@ Komponente: [CountBadge.tsx](../frontend/src/components/CountBadge.tsx), CSS-Kla
|
|||||||
- `muted` (Standard): reine Anzahl. Tabs der Aufgabenlisten und Listen, Organisationen, mobiles Menü.
|
- `muted` (Standard): reine Anzahl. Tabs der Aufgabenlisten und Listen, Organisationen, mobiles Menü.
|
||||||
- Beide kommen aus den Theme-Variablen (`--accent-primary`/`--text-on-accent` bzw. `--text-muted`/`--bg-panel`) und passen sich damit jedem Theme an.
|
- Beide kommen aus den Theme-Variablen (`--accent-primary`/`--text-on-accent` bzw. `--text-muted`/`--bg-panel`) und passen sich damit jedem Theme an.
|
||||||
- **Position (`position`):**
|
- **Position (`position`):**
|
||||||
- `corner`: Benachrichtigungs-Badge oben rechts am nächsten `relative` Elternelement, mit Ring in der Seitenfarbe. In der Navigation und an den Tabs sitzt er **auf dem Text**: der Text steht in einem `relative inline-flex`-Span (mit `pr-2`, solange ein Zähler da ist), der Kreis bekommt `-top-1.5 -right-1`.
|
- `corner`: Benachrichtigungs-Badge oben rechts am nächsten `relative` Elternelement, mit Ring in der Seitenfarbe. In der Navigation und an den Tabs sitzt er **auf dem Text**: der Text steht in einem `relative inline-flex`-Span (mit `pr-3`, solange ein Zähler da ist), der Kreis bekommt `-top-0.5 -right-2`, damit er die obere Tab-Linie nicht anschneidet und nicht am Text klebt. In der mobilen Leiste sitzt er am Icon (`-top-1.5 -right-2.5`).
|
||||||
- `inline`: im Textfluss.
|
- `inline`: im Textfluss.
|
||||||
- Zahlen im mobilen Menü (`MobileActionContext`, `badge: number`) werden automatisch als `CountBadge` gezeigt; Text-Badges wie „2 aktiv“ bleiben Textmarken.
|
- Zahlen im mobilen Menü (`MobileActionContext`, `badge: number`) werden automatisch als `CountBadge` gezeigt; Text-Badges wie „2 aktiv“ bleiben Textmarken.
|
||||||
- **Wichtig für neue Klassen:** Tailwind entfernt Klassen aus `@layer components`, die nicht wörtlich im Code stehen. Klassennamen deshalb nie zusammensetzen (`count-badge-${variant}`), sondern ausschreiben.
|
- **Wichtig für neue Klassen:** Tailwind entfernt Klassen aus `@layer components`, die nicht wörtlich im Code stehen. Klassennamen deshalb nie zusammensetzen (`count-badge-${variant}`), sondern ausschreiben.
|
||||||
|
|||||||
@@ -987,9 +987,9 @@ export const App: React.FC = () => {
|
|||||||
className={`tab-btn ${activeTab === 'triage' ? 'tab-btn-active' : ''}`}
|
className={`tab-btn ${activeTab === 'triage' ? 'tab-btn-active' : ''}`}
|
||||||
>
|
>
|
||||||
<Layers className="w-4 h-4" />
|
<Layers className="w-4 h-4" />
|
||||||
<span className={`relative inline-flex items-center ${stats.inboxCount > 0 ? 'pr-2' : ''}`}>
|
<span className={`relative inline-flex items-center ${stats.inboxCount > 0 ? 'pr-3' : ''}`}>
|
||||||
<span>Triage</span>
|
<span>Triage</span>
|
||||||
<CountBadge count={stats.inboxCount} variant="accent" position="corner" className="-top-1.5 -right-1" />
|
<CountBadge count={stats.inboxCount} variant="accent" position="corner" className="-top-0.5 -right-2" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -1012,9 +1012,9 @@ export const App: React.FC = () => {
|
|||||||
className={`tab-btn ${activeTab === 'tasks' ? 'tab-btn-active' : ''}`}
|
className={`tab-btn ${activeTab === 'tasks' ? 'tab-btn-active' : ''}`}
|
||||||
>
|
>
|
||||||
<CheckSquare className="w-4 h-4" />
|
<CheckSquare className="w-4 h-4" />
|
||||||
<span className={`relative inline-flex items-center ${stats.tasksOpenCount > 0 ? 'pr-2' : ''}`}>
|
<span className={`relative inline-flex items-center ${stats.tasksOpenCount > 0 ? 'pr-3' : ''}`}>
|
||||||
<span>Aufgaben</span>
|
<span>Aufgaben</span>
|
||||||
<CountBadge count={stats.tasksOpenCount} variant="accent" position="corner" className="-top-1.5 -right-1" />
|
<CountBadge count={stats.tasksOpenCount} variant="accent" position="corner" className="-top-0.5 -right-2" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -1026,9 +1026,9 @@ export const App: React.FC = () => {
|
|||||||
className={`tab-btn ${activeTab === 'lists' ? 'tab-btn-active' : ''}`}
|
className={`tab-btn ${activeTab === 'lists' ? 'tab-btn-active' : ''}`}
|
||||||
>
|
>
|
||||||
<ShoppingCart className="w-4 h-4" />
|
<ShoppingCart className="w-4 h-4" />
|
||||||
<span className={`relative inline-flex items-center ${(stats.listItemsOpenCount ?? 0) > 0 ? 'pr-2' : ''}`}>
|
<span className={`relative inline-flex items-center ${(stats.listItemsOpenCount ?? 0) > 0 ? 'pr-3' : ''}`}>
|
||||||
<span>Listen</span>
|
<span>Listen</span>
|
||||||
<CountBadge count={stats.listItemsOpenCount} variant="accent" position="corner" className="-top-1.5 -right-1" />
|
<CountBadge count={stats.listItemsOpenCount} variant="accent" position="corner" className="-top-0.5 -right-2" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -872,9 +872,9 @@ export const SharedListsView: React.FC<SharedListsViewProps> = ({ onRefreshGloba
|
|||||||
>
|
>
|
||||||
<span>{lst.icon}</span>
|
<span>{lst.icon}</span>
|
||||||
{/* Counter on the label, like in the nav bar */}
|
{/* Counter on the label, like in the nav bar */}
|
||||||
<span className={`relative inline-flex items-center ${openCount > 0 ? 'pr-2' : ''}`}>
|
<span className={`relative inline-flex items-center ${openCount > 0 ? 'pr-3' : ''}`}>
|
||||||
{lst.title}
|
{lst.title}
|
||||||
<CountBadge count={openCount} position="corner" className="-top-1.5 -right-1" />
|
<CountBadge count={openCount} position="corner" className="-top-0.5 -right-2" />
|
||||||
</span>
|
</span>
|
||||||
<AvatarStack
|
<AvatarStack
|
||||||
people={otherMembers(lst)}
|
people={otherMembers(lst)}
|
||||||
|
|||||||
@@ -1405,9 +1405,9 @@ export const TasksView: React.FC<TasksViewProps> = ({
|
|||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{/* Counter on the label, like in the nav bar */}
|
{/* Counter on the label, like in the nav bar */}
|
||||||
<span className={`relative inline-flex items-center ${openTasksCount ? 'pr-2' : ''}`}>
|
<span className={`relative inline-flex items-center ${openTasksCount ? 'pr-3' : ''}`}>
|
||||||
Alle Aufgaben
|
Alle Aufgaben
|
||||||
<CountBadge count={openTasksCount} position="corner" className="-top-1.5 -right-1" />
|
<CountBadge count={openTasksCount} position="corner" className="-top-0.5 -right-2" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -1423,9 +1423,9 @@ export const TasksView: React.FC<TasksViewProps> = ({
|
|||||||
className="h-full px-3 text-xs font-medium flex items-center gap-1.5 rounded-btn"
|
className="h-full px-3 text-xs font-medium flex items-center gap-1.5 rounded-btn"
|
||||||
>
|
>
|
||||||
<span>{tl.icon}</span>
|
<span>{tl.icon}</span>
|
||||||
<span className={`relative inline-flex items-center ${tl.tasksCount ? 'pr-2' : ''}`}>
|
<span className={`relative inline-flex items-center ${tl.tasksCount ? 'pr-3' : ''}`}>
|
||||||
{tl.title}
|
{tl.title}
|
||||||
<CountBadge count={tl.tasksCount} position="corner" className="-top-1.5 -right-1" />
|
<CountBadge count={tl.tasksCount} position="corner" className="-top-0.5 -right-2" />
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{(() => {
|
{(() => {
|
||||||
|
|||||||
@@ -1229,9 +1229,9 @@ export const WorkspaceView: React.FC<WorkspaceViewProps> = ({
|
|||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<Check className="w-3.5 h-3.5 text-status-ok" />
|
<Check className="w-3.5 h-3.5 text-status-ok" />
|
||||||
<span className={`relative inline-flex items-center ${totalOpenTodos > 0 ? 'pr-2' : ''}`}>
|
<span className={`relative inline-flex items-center ${totalOpenTodos > 0 ? 'pr-3' : ''}`}>
|
||||||
To-Dos
|
To-Dos
|
||||||
<CountBadge count={totalOpenTodos} position="corner" className="-top-1.5 -right-1" />
|
<CountBadge count={totalOpenTodos} position="corner" className="-top-0.5 -right-2" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -1248,9 +1248,9 @@ export const WorkspaceView: React.FC<WorkspaceViewProps> = ({
|
|||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<Hash className="w-3.5 h-3.5 text-accent" />
|
<Hash className="w-3.5 h-3.5 text-accent" />
|
||||||
<span className={`relative inline-flex items-center ${tagsSummary.length > 0 ? 'pr-2' : ''}`}>
|
<span className={`relative inline-flex items-center ${tagsSummary.length > 0 ? 'pr-3' : ''}`}>
|
||||||
Hashtags
|
Hashtags
|
||||||
<CountBadge count={tagsSummary.length} position="corner" className="-top-1.5 -right-1" />
|
<CountBadge count={tagsSummary.length} position="corner" className="-top-0.5 -right-2" />
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user