Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: display no extension banner on streaming payments page #4120

Draft
wants to merge 6 commits into
base: feat/streaming-payments-ui
Choose a base branch
from

Conversation

adam-strzelec
Copy link
Contributor

Description

Display banner info about no extension installed on streaming payments page if extension is not installed

Testing

  • Make sure, you have no streaming payments extension installed
  • Go to streaming payments page

Diffs

New stuff

  • New stuff goes here

Changes 🏗

Screenshot 2025-01-15 at 16 14 33

Resolves #4096

@adam-strzelec adam-strzelec requested a review from a team as a code owner January 15, 2025 15:16
Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

All looks good to me! Just one tiny spelling mistake to fix.

Screenshot 2025-01-15 at 18 52 41
Screenshot 2025-01-15 at 18 58 03

And after installing:
Screenshot 2025-01-15 at 18 53 12

const isStreamingPaymentsInstalled =
extensionData && isInstalledExtensionData(extensionData);

const inStreamingPaymentsDisabled =
Copy link
Contributor

Choose a reason for hiding this comment

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

Tiny spelling mistake: isStreamingPaymentsDisabled

(You might already have it, but just in case, I use this spell checker VS Code extension which helps me catch issues like this all the time! https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker )

@adam-strzelec adam-strzelec self-assigned this Jan 16, 2025
@AdrianDudko AdrianDudko linked an issue Jan 16, 2025 that may be closed by this pull request
Copy link
Contributor

@mmioana mmioana left a comment

Choose a reason for hiding this comment

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

Hey @adam-strzelec nice start on this issue 🙌

The banner looks great ✨
Screenshot 2025-01-17 at 12 25 38

I left a few refactoring comment, if you could have a look over them, I'd totally appreciate it 👍

Comment on lines 31 to 33
<a href={`${COLONY_EXTENSIONS_ROUTE}/${Extension.StreamingPayments}`}>
{formatMessage(MSG.link)}
</a>
Copy link
Contributor

Choose a reason for hiding this comment

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

By using the <a> tag, we're going to trigger a whole-page reload

Screen.Recording.2025-01-17.at.12.32.30.mov

Let's refactor this and use the Link component.

Also for the extension url we could use const { extensionUrl } = useExtensionItem(Extension.StreamingPayments);

Comment on lines 37 to 36
const isStreamingPaymentsInstalled =
extensionData && isInstalledExtensionData(extensionData);
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe this piece of code can be easily refactored to use

const { isExtensionInstalled } = useExtensionItem(
    Extension.StreamingPayments,
  );

Given it performs already all these checks to verify if the extension was or not installed.

extensionData && isInstalledExtensionData(extensionData);

const inStreamingPaymentsDisabled =
!!extensionData && !isStreamingPaymentsInstalled;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we actually need to check if extensionData exists?

Copy link
Contributor

@iamsamgibbs iamsamgibbs left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, this is still looking good.

Screenshot 2025-01-17 at 17 36 44

@adam-strzelec adam-strzelec force-pushed the feat/streaming-payments-ui branch from 6196803 to af9aebd Compare January 17, 2025 17:56
Copy link
Member

@arrenv arrenv left a comment

Choose a reason for hiding this comment

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

@adam-strzelec Thank you for the PR, the banner looks good. Although, it does not fully meet the issue without the "Create new stream" button.

Also, the banner should show when the extension is in a deprecated state as well. At the moment, it only shows if the extension is not installed.

Not Installed

image

image

Deprecated

image

image

@mmioana
Copy link
Contributor

mmioana commented Jan 20, 2025

@adam-strzelec this branch needs a rebase before I can drop another review 🙌

@adam-strzelec adam-strzelec force-pushed the feat/16237055-display-no-extension-banner branch from 29c1854 to 7aeb3f8 Compare January 20, 2025 16:17
@adam-strzelec
Copy link
Contributor Author

@arrenv Is there a design somewhere that shows what the banner should look like when the extension is deprecated?

@arrenv
Copy link
Member

arrenv commented Jan 20, 2025

@arrenv Is there a design somewhere that shows what the banner should look like when the extension is deprecated?

Sure, the banner and design accounts for both cases.

The message says "Streaming payments extension is currently not enabled." So, when it is not installed or deprecated, then that means it is not enabled.

@adam-strzelec adam-strzelec marked this pull request as draft January 21, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle Streaming page when Streaming extension is not enabled
5 participants