Skip to content

[PB-6492]:feat/new banners for storage advertisement#2002

Open
jaaaaavier wants to merge 7 commits into
masterfrom
feat/progressive-free-usage-storage-advertisements
Open

[PB-6492]:feat/new banners for storage advertisement#2002
jaaaaavier wants to merge 7 commits into
masterfrom
feat/progressive-free-usage-storage-advertisements

Conversation

@jaaaaavier

@jaaaaavier jaaaaavier commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Description

In this PR, we have replaced the WarningMessage that previously appeared when the maximum capacity of the free plan was reached, and we now have a series of banners that appear depending on how the plan is being used; we have three thresholds: 60%, 80% and 95%. The idea is that as a user reaches these thresholds, the banner is displayed (never immediately after a usage spike, but always afterwards). The banner designs have already been added to the UI repository, and here we are customising them according to our requirements – text, shape, colours, etc. The banners have certain conditions under which they are hidden: they remain hidden for 7 days when usage is low, and for 3 days for the other two thresholds we have. We’ve had to add new colours to the library.

The SidenavWrapper component has also been updated, as it forms part of this system.

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

To test it, we created a free account and uploaded files to exceed the thresholds once we’d passed each one, we checked that the banners did indeed appear when and how they should, and that they were working correctly
Captura de pantalla 2026-06-23 a las 14 17 00
Captura de pantalla 2026-06-23 a las 14 17 59

Additional Notes

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 19, 2026

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 25a34ee
Status: ✅  Deploy successful!
Preview URL: https://f98a60a9.drive-web.pages.dev
Branch Preview URL: https://feat-progressive-free-usage.drive-web.pages.dev

View logs

@jaaaaavier jaaaaavier self-assigned this Jun 19, 2026
@jaaaaavier jaaaaavier added the enhancement New feature or request label Jun 19, 2026
@jaaaaavier jaaaaavier marked this pull request as ready for review June 22, 2026 11:02
@sonarqubecloud

Copy link
Copy Markdown

@jaaaaavier jaaaaavier requested a review from xabg2 June 23, 2026 12:27
containerClassName: 'pb rounded-lg bg-alert border border-alert-dark',
advertisementKey: 'modals.reachingUsageBanner.highWarning.sidenavStorageText',
},
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it could be better to centralize this Stages with this one. Something like STORAGE_STAGES_CONFIG and export them whenever you need them and use it as you wish.

import ReferralBanner from './ReferralBanner';
import { CloudWarning } from '@phosphor-icons/react';

type StorageWarning = 'lowWarning' | 'midWarning' | 'highWarning';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is duplicated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This component does to many things. Extract them to a custom hook to handle the warning logic, to a utils file if needed, etc.

workspaceUuid: selectedWorkspace?.workspaceUser.workspaceId,
});
dispatch(uiActions.setIsPreferencesDialogOpen(true));
window.open('https://internxt.com/specialoffer', '_blank', 'noopener,noreferrer');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract this URL to a constants file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants