Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Interactive mode #2

Closed
jonmountjoy opened this Issue Aug 20, 2012 · 8 comments

Comments

Projects
None yet
2 participants

Have you considered adding an interactive mode?
heroku docs dyno -i
(or via a variable: export HEROKU_DOCS_MODE=interactive)

Rarely would someone know the slug of a doc. Moreover, the slug can change. I'd love for this to be the default behavior.

So then:

$ heroku docs dyno
No dyno article found.
     Select one of these, or 0 to exit:
     1   dynos                       # Dynos and the Dyno Manifold
     2   dyno-requests               # How many requests can a dyno serve?
     3   addons_with_dyno_hour_usage # Add-ons with Dyno Hour Usage 
     4  how-much-does-a-dyno-cost   # How much does a dyno cost?
     5  scaling-aspen-bamboo        # Scaling Dynos and Workers on Aspen/Bamboo
     6  background-jobs-queueing    # Worker Dynos, Background Jobs and Queueing
     7  usage-and-billing           # Usage & Billing

> 2
Opening dyno-requests doc... done

Do you have an example of a plugin that seeks input from a user? If so, I can take a bash at implementing...

Owner

geemus commented Aug 20, 2012

@jonmountjoy - when slugs change there are frequently redirects in place aren't there? I believe the current implementation should follow them if there are. Also you are probably right on people not knowing exact slugs. Maybe this is good or maybe if a slug doesn't match exactly it should just open a web page with the search results, which would give us, in effect, the interactive mode but in a more native/explicit format.

Interesting idea. If you took it further, you could argue against your current behaviour (did you mean..) and instead take them to a search page as you suggest?

Downside is you're none the wiser when you want to open the page a second time unless you look at slug. Perhaps that's okay.

On 20 Aug 2012, at 20:41, Wesley Beary notifications@github.com wrote:

@jonmountjoy - when slugs change there are frequently redirects in place aren't there? I believe the current implementation should follow them if there are. Also you are probably right on people not knowing exact slugs. Maybe this is good or maybe if a slug doesn't match exactly it should just open a web page with the search results, which would give us, in effect, the interactive mode but in a more native/explicit format.


Reply to this email directly or view it on GitHub.

Owner

geemus commented Aug 20, 2012

@jonmountjoy - yeah, opening exact match or search might be good enough to just be the default behavior. I somewhat doubt that people will need to re-refer to the same article so often that the extra click from not knowing exact slug would be that problematic.

@geemus geemus closed this in e47211b Aug 20, 2012

Owner

geemus commented Aug 20, 2012

There is an update to match the behavior we were discussing, give it a shot and let me know what you think.

Has anyone told you that heroku plugins:update rocks?

That works. I think the only thing I'd suggest changing is the message?

devcenter ➤ heroku docs dynos


Opening dynos docs… done
devcenter ➤ heroku docs dyno


Opening search for dyno... done

Perhaps in the second instance: "Can't find doc with the dyno slug.
Opening search for dyno…done" ?

Owner

geemus commented Aug 21, 2012

Thanks.

Hmm, I'd like it to still use the opening part regardless. Otherwise it will appear to have hung I think. So maybe:

$ heroku docs dyno
Opening dyno docs... failed
 !    No dyno docs found.
Opening search for dyno... done

or maybe

Opening dyno docs... failed, not found
Opening search for dyno... done

I like the second one. Neat!

Owner

geemus commented Aug 21, 2012

Huh, I was wrong. Doing it more like the way you mention actually works fine (I forgot how I implemented this). I went with this:

 !    No doc matches dyno.
Opening search for dyno... done

@geemus geemus added a commit that referenced this issue Aug 21, 2012

@geemus geemus cleanup messaging on none match
closes #2
ef47dbd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment