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

Refactor TooltipExternalLink #3743

Closed
traumschule opened this issue Oct 24, 2022 · 1 comment · Fixed by #3775
Closed

Refactor TooltipExternalLink #3743

traumschule opened this issue Oct 24, 2022 · 1 comment · Fixed by #3775
Labels
community-dev issue suitable for community-dev pipeline enhancement New feature or request qa-task qa-tested-ready-for-prod release:0.1.1 SP:2

Comments

@traumschule
Copy link
Collaborator

traumschule commented Oct 24, 2022

Tooltips with inline TooltipExternalLink produce bulky un-DRY code.

Replace TooltipExternalLink inside tooltipText with tooltipLinkURL on <Tooltip/>.

Problem

      tooltipText={
        <>
          Total rewards missed. Missed rewards are unallocated rewards from the council budget.{' '}
          <TooltipExternalLink
            href="https://joystream.gitbook.io/testnet-workspace/system/council?q=lock#budget"
            target="_blank"
          >
            <TextMedium>Learn more</TextMedium> <LinkSymbol />
          </TooltipExternalLink>
        </>

Solution

    <Tooltip
      tolltipTitle="Missed Rewards"
      tooltipText="Total rewards missed. Missed rewards are unallocated rewards from the council budget."
      tooltipLinkText="Learn more"
      tooltipLinkURL="https://joystream.gitbook.io/testnet-workspace/system/council?q=lock#budget"
    >
      <TooltipDefault />
    </Tooltip>

Occurences

  1. https://github.com/Joystream/pioneer/blob/dev/packages/ui/src/memberships/modals/BuyMembershipModal/BuyMembershipFormModal.tsx#L270
  2. https://github.com/Joystream/pioneer/blob/dev/packages/ui/src/bounty/modals/AddBountyModal/components/FundingDetailsStep.tsx#L52
  3. https://github.com/Joystream/pioneer/blob/dev/packages/ui/src/proposals/modals/AddNewProposal/components/ExecutionRequirementsWarning.tsx#L20
  4. https://github.com/Joystream/pioneer/blob/dev/packages/ui/src/proposals/modals/AddNewProposal/components/StakingAccountStep.tsx#L37
  5. https://github.com/Joystream/pioneer/blob/dev/packages/ui/src/proposals/modals/AddNewProposal/components/SpecificParameters/SetReferralCut.tsx#L39
  6. https://github.com/Joystream/pioneer/blob/dev/packages/ui/src/proposals/modals/AddNewProposal/components/SpecificParameters/WorkingGroupLeadOpening/CreateWorkingGroupLeadOpening/StakingPolicyAndReward.tsx#L48
  7. https://github.com/Joystream/pioneer/blob/dev/packages/ui/src/accounts/components/StakeStep.tsx#L61
  8. https://github.com/Joystream/pioneer/blob/dev/packages/ui/src/memberships/modals/InviteMemberModal/InviteMemberFormModal.tsx#L159https://github.com/Joystream/pioneer/blob/dev/packages/ui/src/bounty/modals/ContributeFundsModal/ContributeFundsModal.tsx#L210

Out of Scope

@traumschule traumschule added enhancement New feature or request low-prio community-dev issue suitable for community-dev pipeline labels Oct 24, 2022
@traumschule traumschule self-assigned this Oct 27, 2022
@dmtrjsg dmtrjsg added good first issue These issues are a great way to get started with a Pioneer SP:2 labels Oct 28, 2022
traumschule pushed a commit to traumschule/pioneer that referenced this issue Oct 30, 2022
traumschule pushed a commit to traumschule/pioneer that referenced this issue Nov 7, 2022
traumschule pushed a commit to traumschule/pioneer that referenced this issue Nov 19, 2022
@traumschule traumschule added qa-task and removed good first issue These issues are a great way to get started with a Pioneer low-prio to-triage labels Nov 27, 2022
thesan pushed a commit that referenced this issue Nov 30, 2022
* Refactor tooltip links (#3743)

* Add tooltipLinkText, default TooltipExternalLink formatting

* PR Review fixes.

* fix import

* remove unused, mixed tabs and spaces

* Fix handbook links revised (#2847)

* Fix proposals trigger tooltipText (#2346)

* style

Co-authored-by: Joystream Stats <dev@joystreamstats.live>
Co-authored-by: Oleksandr Korniienko <oleksanderkorn@gmail.com>
@traumschule traumschule removed their assignment Dec 7, 2022
XxFlameCatxX pushed a commit to XxFlameCatxX/pioneer that referenced this issue Dec 27, 2022
* Refactor tooltip links (Joystream#3743)

* Add tooltipLinkText, default TooltipExternalLink formatting

* PR Review fixes.

* fix import

* remove unused, mixed tabs and spaces

* Fix handbook links revised (Joystream#2847)

* Fix proposals trigger tooltipText (Joystream#2346)

* style

Co-authored-by: Joystream Stats <dev@joystreamstats.live>
Co-authored-by: Oleksandr Korniienko <oleksanderkorn@gmail.com>
@ivanturlakov
Copy link

ivanturlakov commented Jan 10, 2023

Tested on https://dao-git-staging-joystream.vercel.app/
wss://34.230.5.182.nip.io/ws-rpc

For problematic cases, I created separate issues

✅ packages/ui/src/memberships/modals/BuyMembershipModal/BuyMembershipFormModal.tsx
Снимок экрана 2023-01-10 в 12 33 19

✅ packages/ui/src/bounty/modals/AddBountyModal/components/FundingDetailsStep.tsx
Снимок экрана 2023-01-10 в 12 44 22

✅ packages/ui/src/proposals/modals/AddNewProposal/components/StakingAccountStep.tsx
Снимок экрана 2023-01-10 в 13 13 25

✅ packages/ui/src/proposals/modals/AddNewProposal/components/SpecificParameters/SetReferralCut.tsx
Снимок экрана 2023-01-10 в 13 17 04

✅ packages/ui/src/proposals/modals/AddNewProposal/components/SpecificParameters/WorkingGroupLeadOpening/CreateWorkingGroupLeadOpening/StakingPolicyAndReward.tsx
Снимок экрана 2023-01-10 в 13 20 48

⚠️ packages/ui/src/accounts/components/StakeStep.tsx
Снимок экрана 2023-01-10 в 13 44 04

⚠️ packages/ui/src/memberships/modals/InviteMemberModal/InviteMemberFormModal.tsx
Снимок экрана 2023-01-10 в 13 47 57

✅ packages/ui/src/bounty/modals/ContributeFundsModal/ContributeFundsModal.tsx
Снимок экрана 2023-01-10 в 13 48 52

✅ packages/ui/src/memberships/modals/BuyMembershipModal/BuyMembershipSignModal.tsx
Снимок экрана 2023-01-10 в 12 41 09

@thesan thesan closed this as completed Jan 12, 2023
XxFlameCatxX pushed a commit to XxFlameCatxX/pioneer that referenced this issue Jan 14, 2023
* Refactor tooltip links (Joystream#3743)

* Add tooltipLinkText, default TooltipExternalLink formatting

* PR Review fixes.

* fix import

* remove unused, mixed tabs and spaces

* Fix handbook links revised (Joystream#2847)

* Fix proposals trigger tooltipText (Joystream#2346)

* style

Co-authored-by: Joystream Stats <dev@joystreamstats.live>
Co-authored-by: Oleksandr Korniienko <oleksanderkorn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community-dev issue suitable for community-dev pipeline enhancement New feature or request qa-task qa-tested-ready-for-prod release:0.1.1 SP:2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants