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

Open
wants to merge 112 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

iamsamgibbs and others added 30 commits November 6, 2024 10:37
…ng-permissions

Feat: Cancel streams using permissions
@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 +38
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
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
8 participants