Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Package show URI - #614

Merged
thedaniel merged 21 commits into
masterfrom
package-show-uri
Aug 12, 2015
Merged

thedaniel merged 21 commits into
masterfrom
package-show-uri

Conversation

@thedaniel

Copy link
Copy Markdown
Contributor

This allows a package detail view to be shown directly from a URI, whether it's installed or not. This is useful for e.g. installing packages from links on the webiste (atom/atom#5262) or linking directly to the the metrics package from atom/welcome to make it simple to disable (atom/atom#4966) among other things.

Here's a dump of my notes for the flow, it should match the specs as well.

# PackageDetailView:

- Is pack present?
  - Yes
    - is it complete?
      - Yes
        - Does everything render normally? Cool.
      - No
        - [A] Is the network available?
          - Yes
            - Call the network.
              - Failure?
                - Show an error page
              - Success?
                - Render that thing (don't forget to rerender the subview)
  - No
    - See [A]

@thedaniel

Copy link
Copy Markdown
Contributor Author

Anywho this PR represents the design decision that PackageDetailView is responsible for figuring out whether the whole package is there and hitting the network and displaying the right state. An alternative is handling it in main.coffee or SettingsView but this feels right to me.

@thomasjo

Copy link
Copy Markdown
Contributor

Can't wait! Thanks for working on this @thedaniel.

thedaniel added a commit to atom/welcome that referenced this pull request Aug 7, 2015
@thedaniel

Copy link
Copy Markdown
Contributor Author

@atom/feedback i think this is ready to review. I'm not fully confident that it handles all error states but I've tried to handle network errors in a simple, catch-all kind of way.

I'd like to leave this undocumented for now as the initial use is just intended to be atom/welcome#38 - you can link that branch in dev mode to see it in action from the welcome package.

When we address atom/atom#5262 we may discover some necessary changes, etc, and I would suggest documenting this at that time.

Comment thread lib/package-card.coffee Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

prolly should use an unless here

@benogle

benogle commented Aug 7, 2015

Copy link
Copy Markdown
Contributor

Will be cool to have this 👍

@thedaniel thedaniel changed the title [WIP] Package show URI Package show URI Aug 7, 2015
@thedaniel

Copy link
Copy Markdown
Contributor Author

I'm going to merge this after our next release goes out, likely tuesday, and then get that metrics update in right after.

@thomasjo

Copy link
Copy Markdown
Contributor

Been testing this for a couple of days now, and not noticed any regressions or bugs ✨

Only thing missing, but that could perhaps be addressed in a separate PR, is serializing the current package panel details. If I e.g. reload Atom while viewing a package's config, I'll land back in the core settings panel after the reload. Whereas I expect to still be viewing the package config panel. At the very least I expect to remain in the Packages section.

@thedaniel

Copy link
Copy Markdown
Contributor Author

@thomasjo given that settings-view doesn't serialize that on master either (in other words, it's not a regression here), a separate issue / PR is fine.

thedaniel added a commit that referenced this pull request Aug 12, 2015
Support atom://packages/:name URI
@thedaniel
thedaniel merged commit 35aa7b3 into master Aug 12, 2015
@thedaniel
thedaniel deleted the package-show-uri branch August 12, 2015 16:43
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.

3 participants