Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Feat: added "Fund this package" button #375

Merged
merged 5 commits into from
Dec 18, 2019

Conversation

priscilawebdev
Copy link
Contributor

@priscilawebdev priscilawebdev commented Dec 17, 2019

Type: Feat

The following has been addressed in the PR: #361

Description: Introduced "Fund this package" button.

image

@priscilawebdev priscilawebdev self-assigned this Dec 17, 2019
@codecov
Copy link

codecov bot commented Dec 18, 2019

Codecov Report

Merging #375 into master will decrease coverage by 0.48%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master     #375      +/-   ##
==========================================
- Coverage   88.26%   87.77%   -0.49%     
==========================================
  Files         136      137       +1     
  Lines         946      949       +3     
  Branches      191      197       +6     
==========================================
- Hits          835      833       -2     
- Misses         98      103       +5     
  Partials       13       13
Impacted Files Coverage Δ
src/design-tokens/theme.ts 100% <ø> (ø) ⬆️
...mponents/DetailSidebar/DetailSidebarFundButton.tsx 44.44% <44.44%> (ø)
src/components/DetailSidebar/DetailSidebar.tsx 77.77% <75%> (-5.56%) ⬇️
...rc/components/DetailSidebar/DetailSidebarTitle.tsx 85.71% <85.71%> (ø)

@priscilawebdev priscilawebdev changed the title WIP: Feat: added "Fund this package" button Feat: added "Fund this package" button Dec 18, 2019
@juanpicado juanpicado requested review from a team December 18, 2019 06:13
@juanpicado
Copy link
Member

@priscilawebdev it has conflicts ..


/* eslint-disable react/jsx-no-bind */
const DetailSidebarFundButton: React.FC<Props> = ({ to }) => {
const preventDefault = (event: MouseEvent<HTMLButtonElement>) => event.preventDefault();
Copy link
Member

Choose a reason for hiding this comment

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

The user clicks the button and then what happens? .... We should open the target in a new tab.

Copy link
Member

Choose a reason for hiding this comment

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

We must also update @verdaccio/types to be able to have

  "funding": {
    "type": "opencollective",
    "url": "https://opencollective.com/verdaccio"
  },

in https://github.com/verdaccio/monorepo/blob/master/core/types/index.d.ts#L132 as optional type. Then can be used here.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@priscilawebdev priscilawebdev Dec 18, 2019

Choose a reason for hiding this comment

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

@juanpicado Thanks for your feedback :)

The component StyledLink has the prop "external". When this prop is set to true, the anchor element will have target="_blank" .😉

Copy link
Member

Choose a reason for hiding this comment

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

so is it configurable from the verdaccio config file ?

I would make it default to new tab (_blank)

Copy link
Member

@juanpicado juanpicado left a comment

Choose a reason for hiding this comment

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

Looks nice 👍

@verdacciobot
Copy link

Thanks for your PR, the @verdaccio/ui package will be accessible from here for testing purposes:

npm install @verdaccio/[email protected] --registry https://registry.verdaccio.org

@priscilawebdev priscilawebdev merged commit bf093cc into master Dec 18, 2019
@delete-merged-branch delete-merged-branch bot deleted the feature/361_add_funding_button branch December 18, 2019 20:30
@juanpicado
Copy link
Member

juanpicado commented Jan 4, 2020

The best would be to have a PR with the whole thing instead spread the feature in multiple PR, this is helpful when we need to track issues or when features were introduced, thus the changelog file looks cleaner and anyone can identify the exact version where a feat/bug was introduced.

@DanielRuf
Copy link
Contributor

Smaller commits / PRs make bisecting easier (I know, we squash them by default).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants