Skip to content

Conversation

@jaaaaavier
Copy link
Contributor

@jaaaaavier jaaaaavier commented Jan 2, 2026

Description

Added logic to show the FeaturesBanner only after the user has uploaded their first file and 90 seconds. This ensures new users see the banner at the appropriate time.

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

Created a new account, and uploaded File, then checked the banner displays after 90 seconds, uploaded a video on the Jira task

Additional Notes

@jaaaaavier jaaaaavier marked this pull request as draft January 2, 2026 09:51
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 2, 2026

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: db21d09
Status: ✅  Deploy successful!
Preview URL: https://60ced75e.drive-web.pages.dev
Branch Preview URL: https://feature-set-new-conditions-t.drive-web.pages.dev

View logs

@jaaaaavier jaaaaavier marked this pull request as ready for review January 2, 2026 10:01
@jaaaaavier jaaaaavier self-assigned this Jan 2, 2026
@jaaaaavier jaaaaavier added the enhancement New feature or request label Jan 2, 2026
Comment on lines 23 to 29
useEffect(() => {
const timeout = setTimeout(() => setShowDelayedBanner(true), TIMEOUT);
return () => clearTimeout(timeout);
newStorageService.hasUploadedFiles().then(({ hasUploadedFiles }) => {
if (hasUploadedFiles) {
setHasUploadedFirstFile(true);
}
});
}, []);
Copy link
Collaborator

Choose a reason for hiding this comment

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

this logic only checks the upload status when mount hte banner, are this the behaviour that you want?
Add the related tests :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's the intended behavior. I've used the same approach we have for the tutorial. I've tested it and confirmed that the banner doesn't appear after 90 seconds just from being on the homepage, and that it correctly appears 90 seconds after the first file upload. Adding the tests now.

@jaaaaavier jaaaaavier requested a review from CandelR January 5, 2026 13:26
@jaaaaavier jaaaaavier removed the request for review from larryrider January 7, 2026 13:24
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 8, 2026

@jaaaaavier jaaaaavier merged commit c960f77 into master Jan 8, 2026
10 checks passed
@jaaaaavier jaaaaavier deleted the feature/set-new-conditions-to-show-features-banner branch January 8, 2026 11:48
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.

4 participants