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: pinning services stage 1 #1685

Merged
merged 27 commits into from
Dec 14, 2020
Merged

Conversation

rafaelramalho19
Copy link
Contributor

@rafaelramalho19 rafaelramalho19 commented Nov 4, 2020

This is a pull request that marks the stage 1 of pinning services.

This includes:

  • Local pinning now works with future-proof modal for remote pins
  • Settings page now reflects how much space local pinning occupies.

Closes #1500
Closes #1501

@rafaelramalho19 rafaelramalho19 self-assigned this Nov 4, 2020
@rafaelramalho19 rafaelramalho19 added the kind/enhancement A net-new feature or improvement to an existing feature label Nov 4, 2020
Copy link
Contributor

@jessicaschilling jessicaschilling left a comment

Choose a reason for hiding this comment

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

Thank you! 😊 Functionally this seems perfect on my end. Left some comments inline on visual/UX stuff, but a few other thoughts:

  1. On the Settings screen, the left-most table items (both headers and row cells) have both a 10px margin-left and a pl2 on them. This has the effect of the leftmost column of the table looking too indented as a whole. Not sure which styling should be removed to mitigate this, though?

  2. On the Settings screen table, can the rows' cells truncate with ellipses at narrow widths (like the headers do), and can their full values display in hover text (also like the headers)?

  3. We'll need to add explanatory content to the CLI tutor modal to this effect: This command will only pin this item's CID to your local node. If you want to persist it with a remote pinning service, consult that service's CLI documentation to learn how. Right now we have i18n key cliModal.extraNotes for that purpose, but it's effectively hard-coded for one use (the config in Settings). The best way to remedy might be to move cliModal.extraNotes out of app.json and into settings.json and files.json?

public/locales/en/settings.json Outdated Show resolved Hide resolved
src/files/header/Header.js Show resolved Hide resolved
src/components/pinning-manager/PinningManager.js Outdated Show resolved Hide resolved
src/components/pinning-manager/PinningManager.js Outdated Show resolved Hide resolved
src/components/modal/Modal.js Outdated Show resolved Hide resolved
src/files/modals/pinning-modal/PinningModal.js Outdated Show resolved Hide resolved
public/locales/en/files.json Outdated Show resolved Hide resolved
@rafaelramalho19
Copy link
Contributor Author

  1. We'll need to add explanatory content to the CLI tutor modal to this effect: This command will only pin this item's CID to your local node. If you want to persist it with a remote pinning service, consult that service's CLI documentation to learn how. Right now we have i18n key cliModal.extraNotes for that purpose, but it's effectively hard-coded for one use (the config in Settings). The best way to remedy might be to move cliModal.extraNotes out of app.json and into settings.json and files.json?

I think that's a good point, but it's something that doesn't need to be addressed in this stage :)

@jessicaschilling
Copy link
Contributor

jessicaschilling commented Nov 5, 2020

@rafaelramalho19 Added #1686 for the CLI tutor mode change - I'll do that real quick once this PR gets merged.

Copy link
Contributor

@jessicaschilling jessicaschilling left a comment

Choose a reason for hiding this comment

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

LGTM, just one thing that got left out from the original review 😊

On the Settings screen table, can the rows' cells truncate with ellipses at narrow widths (like the headers do), and can their full values display in hover text (also like the headers)?

src/files/header/Header.js Outdated Show resolved Hide resolved
Copy link
Contributor

@jessicaschilling jessicaschilling left a comment

Choose a reason for hiding this comment

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

On the Settings screen table, can the rows' cells truncate with ellipses at narrow widths (like the headers do), and can their full values display in hover text (also like the headers)?

Otherwise this happens:

image

@lidel lidel changed the title Feat/pinning services stage 1 feat: pinning services stage 1 Nov 6, 2020
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Wrote down some suggestions and one minor blocker inline, but hopefully all those are easy to fix.
Apart from that, looks wonderful! 👍

ps. Some users may be impacted by the fact this PR removes old #/pins screen, and with that, the ability to remove a pin after an item is removed from Files. I don't think this is a problem as long we land ability to Delete and Unpin (#1644). Just mentioning here, so we don't forget.

ps2. Does this supersede #1615? Should I close that PR?

public/locales/en/files.json Outdated Show resolved Hide resolved
src/components/pinning-manager/PinningManager.js Outdated Show resolved Hide resolved
src/components/pinning-manager/PinningManager.js Outdated Show resolved Hide resolved
public/locales/en/settings.json Outdated Show resolved Hide resolved
src/files/header/Header.js Outdated Show resolved Hide resolved
src/files/header/Header.js Outdated Show resolved Hide resolved
src/components/pinning-manager/PinningManager.js Outdated Show resolved Hide resolved
@rafaelramalho19
Copy link
Contributor Author

Wrote down some suggestions and one minor blocker inline, but hopefully all those are easy to fix.
Apart from that, looks wonderful! 👍

ps. Some users may be impacted by the fact this PR removes old #/pins screen, and with that, the ability to remove a pin after an item is removed from Files. I don't think this is a problem as long we land ability to Delete and Unpin (#1644). Just mentioning here, so we don't forget.

ps2. Does this supersede #1615? Should I close that PR?

Good call, closing it 👍

@lidel lidel mentioned this pull request Nov 9, 2020
public/locales/en/files.json Outdated Show resolved Hide resolved
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

@rafaelramalho19 seems e2e tests started failing after you merged updates from master – let me know if you are looking into it or got blocked and need a second pair of eyes.

rafaelramalho19 and others added 10 commits November 10, 2020 15:06
Co-authored-by: Jessica Schilling <jessica@protocol.ai>
* feat: add pinning services service modal

* chore: update translation for service modal
* chore: refactor files page

* feat: add pinning services mock to files page

* chore: update remotePin dimensions

Co-authored-by: Jessica Schilling <jessica@protocol.ai>

* chore: update local pin icon dimension

Co-authored-by: Jessica Schilling <jessica@protocol.ai>

* chore: change pin icon fill color

Co-authored-by: Jessica Schilling <jessica@protocol.ai>

* chore: change remote pin icon fill color

Co-authored-by: Jessica Schilling <jessica@protocol.ai>

* chore: update pinning modal text size

Co-authored-by: Jessica Schilling <jessica@protocol.ai>

* chore: update pinning modal text size

Co-authored-by: Jessica Schilling <jessica@protocol.ai>

* chore: pinning modal secondary text changes

Co-authored-by: Jessica Schilling <jessica@protocol.ai>

* chore: update pinning modal image size

Co-authored-by: Jessica Schilling <jessica@protocol.ai>

* chore: update pinning modal pin icon

Co-authored-by: Jessica Schilling <jessica@protocol.ai>

* chore: add pin status column to fileslist

* chore: fix modals icons

* chore: fix linting error

* chore: fix files sorting

Co-authored-by: Jessica Schilling <jessica@protocol.ai>
@lidel
Copy link
Member

lidel commented Nov 11, 2020

@rafaelramalho19 I was able to reproduce the CI error locally on Linux with:

npm ci && npm run build && npm run test:e2e

Note that E2E test suite requires a prebuilt static version.
Maybe you were running against older build? Mind checking?

What is interesting is that the tests do not fail when you run debug mode (debug runs tests in slowed down mode and with browser window visible):

DEBUG=true npm run test:e2e

If you disable sloMo then in GUI can see a problem when JSON config is quickly typed into the field – sometimes it becomes garbled:

2020-11-11--02-10-52

If I set sloMo to 50 then headless tests are green.
Looks like some kind of regression, not sure what caused it.

Unfortunately I've run out of time to look deeper into this and I'm OOO on Wednesday – will pick up on Thursday if still needed.

@rafaelramalho19
Copy link
Contributor Author

@rafaelramalho19 I was able to reproduce the CI error locally on Linux with:

npm ci && npm run build && npm run test:e2e

Note that E2E test suite requires a prebuilt static version.
Maybe you were running against older build? Mind checking?

What is interesting is that the tests do not fail when you run debug mode (debug runs tests in slowed down mode and with browser window visible):

DEBUG=true npm run test:e2e

If you disable sloMo then in GUI can see a problem when JSON config is quickly typed into the field – sometimes it becomes garbled:

2020-11-11--02-10-52

If I set sloMo to 50 then headless tests are green.
Looks like some kind of regression, not sure what caused it.

Unfortunately I've run out of time to look deeper into this and I'm OOO on Wednesday – will pick up on Thursday if still needed.

Weirdly it doesn't happen in master, so I guess it was due to changes in the settings page in this branch 🤔

@lidel
Copy link
Member

lidel commented Nov 13, 2020

PSA: I am helping with ipfs/kubo#7661 won't be able to look into this until next week.

rafaelramalho19 and others added 2 commits November 16, 2020 18:37
This changes the way we enter API address/config from programmatic
to full simulation of user input and adds tiny slow down between each
key stroke.

This should solve the problem of newly added UI feedback not engaging,
and make CI both more reliable and green again.

While at it, made it CI-agnostic, in preparation for move to
GithubActions
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

@rafaelramalho19 go-ipfs 0.8.0-rc1 shipped so I was able to switch and fix E2E tests here – details in 7089d93 (better late than never 😅)

Let's discuss next steps during Monday's issue triage,
but if you start work before the call, my quick suggestion is to focus on steps 1 & 2:

  1. Merge this PR – LGTM! ❤️
    • nit: calculating total size of all pins is expensive: I have over 1k of pins and it takes minutes of "Loading..." so its pretty useless for users with a lot of pins. That being said, it is not a blocker, it runs in background, and we can revisit/optimize in (2)
  2. Start a new PR to wire up Pinning Services
  3. (TBD) tag a release without (2)
    • We should tag an intermediate release to be included in go-ipfs 0.8.0 – open a PR and use version from this PR, and if time allows then switch 0.8.0 to version with Pinning Services, if not, we would ship go-ipfs without it and add it in January in 0.8.1
    • As this PR removes screen with low level pins, we kinda need to rebase and finish feat: delete-modal pin guidance, improved language #1644 to give users means of removing pins while they remove files from

@rafaelramalho19 rafaelramalho19 merged commit 2a312a3 into master Dec 14, 2020
@rafaelramalho19 rafaelramalho19 deleted the feat/pinning-services-stage-1 branch December 14, 2020 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pinning integration: Stub UI for Settings screen Pinning integration: Stub UI for Files screen
3 participants