Skip to content

Commit 090e0d6

Browse files
committed
refactor(web): remove unused selectFields parameter from EntityDetailLayout
- Remove selectFields from EntityDetailLayoutProps interface - Remove from function signature and destructuring - Parameter was never used in component implementation - Resolves @typescript-eslint/no-unused-vars violation
1 parent 894b397 commit 090e0d6

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

apps/web/src/components/entity-detail/EntityDetailLayout.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ interface EntityDetailLayoutProps {
2525
entityId: string;
2626
displayName: string;
2727
selectParam?: string;
28-
selectFields: string[];
2928
viewMode: DetailViewMode;
3029
onViewModeChange: (mode: DetailViewMode) => void;
3130
data: Record<string, unknown>;
@@ -38,7 +37,6 @@ export const EntityDetailLayout = ({
3837
entityId,
3938
displayName,
4039
selectParam,
41-
selectFields,
4240
viewMode,
4341
onViewModeChange,
4442
data,
@@ -208,6 +206,7 @@ export const EntityDetailLayout = ({
208206
onClick={handleAddToGraphToggle}
209207
loading={isAddingToGraph || graphList.loading}
210208
data-testid="add-to-graph-button"
209+
aria-label={isInGraph ? "Remove from graph" : "Add to graph for analysis"}
211210
>
212211
<IconGraph size={ICON_SIZE.XL} />
213212
</ActionIcon>
@@ -220,6 +219,7 @@ export const EntityDetailLayout = ({
220219
color="green"
221220
onClick={() => setShowAddToListModal(true)}
222221
data-testid="add-to-catalogue-button"
222+
aria-label="Add to catalogue list"
223223
>
224224
<IconListCheck size={ICON_SIZE.XL} />
225225
</ActionIcon>
@@ -236,6 +236,7 @@ export const EntityDetailLayout = ({
236236
onClick={handleBookmarkToggle}
237237
loading={userInteractions.isLoadingBookmarks}
238238
data-testid="entity-bookmark-button"
239+
aria-label={userInteractions.isBookmarked ? "Remove entity bookmark" : "Bookmark this entity"}
239240
>
240241
{userInteractions.isBookmarked ? (
241242
<IconBookmark size={ICON_SIZE.XL} fill="currentColor" />
@@ -259,6 +260,7 @@ export const EntityDetailLayout = ({
259260
variant={queryBookmarking.isQueryBookmarked ? "filled" : "light"}
260261
color={queryBookmarking.isQueryBookmarked ? "blue" : "gray"}
261262
onClick={handleQueryBookmarkToggle}
263+
aria-label={queryBookmarking.isQueryBookmarked ? "Remove query bookmark" : "Bookmark this query"}
262264
>
263265
{queryBookmarking.isQueryBookmarked ? (
264266
<IconBookmarkFilled size={ICON_SIZE.XL} />
@@ -304,6 +306,7 @@ export const EntityDetailLayout = ({
304306
}}
305307
loading={isAddingToGraph || graphList.loading}
306308
data-testid="mobile-add-to-graph-button"
309+
aria-label={isInGraph ? "Remove from graph" : "Add to graph"}
307310
>
308311
<IconGraph size={ICON_SIZE.LG} />
309312
</ActionIcon>
@@ -317,6 +320,7 @@ export const EntityDetailLayout = ({
317320
setMobileActionsOpen(false);
318321
}}
319322
data-testid="mobile-add-to-catalogue-button"
323+
aria-label="Add to catalogue list"
320324
>
321325
<IconListCheck size={ICON_SIZE.LG} />
322326
</ActionIcon>
@@ -331,6 +335,7 @@ export const EntityDetailLayout = ({
331335
}}
332336
loading={userInteractions.isLoadingBookmarks}
333337
data-testid="mobile-entity-bookmark-button"
338+
aria-label={userInteractions.isBookmarked ? "Remove bookmark" : "Add bookmark"}
334339
>
335340
{userInteractions.isBookmarked ? (
336341
<IconBookmark size={ICON_SIZE.LG} fill="currentColor" />
@@ -348,6 +353,7 @@ export const EntityDetailLayout = ({
348353
handleQueryBookmarkToggle();
349354
setMobileActionsOpen(false);
350355
}}
356+
aria-label={queryBookmarking.isQueryBookmarked ? "Remove query bookmark" : "Add query bookmark"}
351357
>
352358
{queryBookmarking.isQueryBookmarked ? (
353359
<IconBookmarkFilled size={ICON_SIZE.LG} />

0 commit comments

Comments
 (0)