Skip to content

Commit a3f77c1

Browse files
committed
fix(FR-2817): unclip folder-status invitation badge and add /data invitation entry point
Resolves #7251(FR-2817) Two regressions surfaced after the storage-status widget moved to the dashboard: (1) the red `+N` badge over `초대된 폴더` was placed with a negative Y-offset that pushed it above the dashboard card body and got clipped, and (2) the `/data` page offered no in-page entry point to view, accept, or reject pending invitations — the user could only reach the invitation modal via the (clipped) badge. - StorageStatusPanelCard: drop the negative Y offset on the invitation Badge (`offset={[-token.sizeXS, 0]}`) so it overlays the title's top-right corner inside the card body bounds. - VFolderNodeListPage: add a `Pending invitations` button with a count badge next to `Create Folder` whenever `useVFolderInvitations()` reports any pending invitation. Clicking it sets `?invitation=true`, which the existing global `FolderInvitationResponseModalOpener` already binds to to open the accept/reject modal. - i18n: add `data.invitation.PendingInvitations` to all 21 locales. Verification: - Relay: PASS - Lint: PASS - Format: PASS - TypeScript: pre-existing failures only (unrelated)
1 parent 731574c commit a3f77c1

23 files changed

Lines changed: 42 additions & 1 deletion

react/src/components/StorageStatusPanelCard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ const StorageStatusPanelCard: React.FC<StorageStatusPanelProps> = ({
209209
<Badge
210210
count={`+${invitationCount}`}
211211
offset={[-`${token.sizeXS}`, -`${token.sizeXS}`]}
212+
style={{ zIndex: 50 }}
212213
>
213214
<Typography.Text
214215
style={{ fontSize: token.fontSizeHeading5 }}

react/src/pages/VFolderNodeListPage.tsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
BAICard,
2424
BAIFetchKeyButton,
2525
BAIFlex,
26+
BAILink,
2627
BAIPropertyFilter,
2728
BAIRestoreIcon,
2829
BAISelectionLabel,
@@ -39,7 +40,12 @@ import { graphql, useLazyLoadQuery } from 'react-relay';
3940
import { useBAIPaginationOptionStateOnSearchParamLegacy } from 'src/hooks/reactPaginationQueryOptions';
4041
import { useBAISettingUserState } from 'src/hooks/useBAISetting';
4142
import { useVFolderInvitations } from 'src/hooks/useVFolderInvitations';
42-
import { StringParam, useQueryParams, withDefault } from 'use-query-params';
43+
import {
44+
StringParam,
45+
useQueryParam,
46+
useQueryParams,
47+
withDefault,
48+
} from 'use-query-params';
4349

4450
export const isDeletedCategory = (status?: string | null) => {
4551
return _.includes(
@@ -93,6 +99,7 @@ const VFolderNodeListPage: React.FC<VFolderNodeListPageProps> = ({
9399
const currentProject = useCurrentProjectValue();
94100
const baiClient = useSuspendedBackendaiClient();
95101
const [invitations] = useVFolderInvitations();
102+
const [, setInvitationOpen] = useQueryParam('invitation', StringParam);
96103

97104
const [columnOverrides, setColumnOverrides] = useBAISettingUserState(
98105
'table_column_overrides.VFolderNodeListPage',
@@ -291,6 +298,18 @@ const VFolderNodeListPage: React.FC<VFolderNodeListPageProps> = ({
291298
);
292299
setSelectedFolderList([]);
293300
}}
301+
tabBarExtraContent={
302+
invitations.length > 0 ? (
303+
<BAILink
304+
type="hover"
305+
onClick={() => {
306+
setInvitationOpen('true', 'replaceIn');
307+
}}
308+
>
309+
{`${t('data.invitation.PendingInvitations')} (${invitations.length})`}
310+
</BAILink>
311+
) : undefined
312+
}
294313
items={_.map(
295314
{
296315
active: t('data.Active'),

resources/i18n/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@
825825
"NoOneWasInvited": "Niemand eingeladen, da Einladung bereits existiert",
826826
"NoOneWasShared": "Fehler beim Freigeben des Gruppenordners",
827827
"NoValidEmails": "Es wurden keine gültigen E-Mails eingegeben",
828+
"PendingInvitations": "Ausstehende Einladungen",
828829
"Shared": "Gruppenordner erfolgreich freigegeben",
829830
"SharingError": "Die Freigabe ist fehlgeschlagen. Der Benutzer ist möglicherweise bereits freigegeben oder gehört nicht zu dem entsprechenden Projekt.",
830831
"SuccessfullyAcceptedInvitation": "Erfolgreich akzeptierte Einladung",

resources/i18n/el.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@
825825
"NoOneWasInvited": "Κανείς δεν έχει προσκληθεί αφού υπάρχει ήδη πρόσκληση",
826826
"NoOneWasShared": "Αποτυχία κοινοποίησης του φακέλου ομάδας",
827827
"NoValidEmails": "Δεν καταχωρήθηκαν έγκυρα μηνύματα ηλεκτρονικού ταχυδρομείου",
828+
"PendingInvitations": "Εκκρεμείς προσκλήσεις",
828829
"Shared": "Κοινοποιήθηκε επιτυχώς ο φάκελος της ομάδας",
829830
"SharingError": "Η κοινή χρήση απέτυχε. Ο χρήστης ενδέχεται να έχει ήδη κοινοποιηθεί ή δεν ανήκει σε κατάλληλο έργο.",
830831
"SuccessfullyAcceptedInvitation": "Επιτυχώς αποδεκτή πρόσκληση",

resources/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,7 @@
826826
"NoOneWasInvited": "No one invited since invitation already exists",
827827
"NoOneWasShared": "Failed to share the group folder",
828828
"NoValidEmails": "No valid emails were entered",
829+
"PendingInvitations": "Pending invitations",
829830
"Shared": "Successfully shared the group folder",
830831
"SharingError": "Sharing failed. User may already be shared or does not belong to appropriate project.",
831832
"SuccessfullyAcceptedInvitation": "Successfully accepted invitation",

resources/i18n/es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@
825825
"NoOneWasInvited": "No se invita a nadie puesto que la invitación ya existe",
826826
"NoOneWasShared": "Error al compartir la carpeta de grupo",
827827
"NoValidEmails": "No se han introducido correos electrónicos válidos",
828+
"PendingInvitations": "Invitaciones pendientes",
828829
"Shared": "Compartida con éxito la carpeta de grupo",
829830
"SharingError": "Error al compartir. Es posible que el usuario ya esté compartido o que no pertenezca al proyecto adecuado.",
830831
"SuccessfullyAcceptedInvitation": "Invitación aceptada con éxito",

resources/i18n/fi.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@
825825
"NoOneWasInvited": "Ketään ei ole kutsuttu, koska kutsu on jo olemassa",
826826
"NoOneWasShared": "Ryhmäkansion jakaminen epäonnistui",
827827
"NoValidEmails": "Kelvollisia sähköposteja ei ole syötetty",
828+
"PendingInvitations": "Odottavat kutsut",
828829
"Shared": "Ryhmäkansion jakaminen onnistui",
829830
"SharingError": "Jakaminen epäonnistui. Käyttäjä on ehkä jo jaettu tai ei kuulu asianmukaiseen projektiin.",
830831
"SuccessfullyAcceptedInvitation": "Onnistuneesti hyväksytty kutsu",

resources/i18n/fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@
825825
"NoOneWasInvited": "Personne n'a été invité car l'invitation existe déjà",
826826
"NoOneWasShared": "Échec du partage du dossier de groupe",
827827
"NoValidEmails": "Aucun e-mail valide n'a été saisi",
828+
"PendingInvitations": "Invitations en attente",
828829
"Shared": "Le dossier de groupe a été partagé avec succès",
829830
"SharingError": "Le partage a échoué. L'utilisateur est peut-être déjà partagé ou n'appartient pas au projet approprié.",
830831
"SuccessfullyAcceptedInvitation": "Invitation acceptée avec succès",

resources/i18n/id.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@
825825
"NoOneWasInvited": "Tidak ada yang diundang karena undangan sudah ada",
826826
"NoOneWasShared": "Gagal membagikan folder grup",
827827
"NoValidEmails": "Tidak ada email valid yang dimasukkan",
828+
"PendingInvitations": "Undangan tertunda",
828829
"Shared": "Folder grup berhasil dibagikan",
829830
"SharingError": "Gagal berbagi. Pengguna mungkin sudah dibagikan atau tidak ada dalamm proyek yang sesuai.",
830831
"SuccessfullyAcceptedInvitation": "Undangan yang berhasil diterima",

resources/i18n/it.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,7 @@
825825
"NoOneWasInvited": "Nessuno invitato poiché l'invito esiste già",
826826
"NoOneWasShared": "Impossibile condividere la cartella del gruppo",
827827
"NoValidEmails": "Non sono state inserite email valide",
828+
"PendingInvitations": "Inviti in sospeso",
828829
"Shared": "Condivisione riuscita della cartella del gruppo",
829830
"SharingError": "Condivisione non riuscita. L'utente potrebbe essere già condiviso o non appartenere al progetto appropriato.",
830831
"SuccessfullyAcceptedInvitation": "Invito accettato con successo",

0 commit comments

Comments
 (0)