Skip to content

Conversation

@joguSD
Copy link
Contributor

@joguSD joguSD commented Aug 15, 2016

Implements an Info Select interaction that will show the full JSON body of whatever option you're currently selecting in a similar fashion to the docs pane. I held off on adding this because I was unsure about how to safely render the responses as JSON because the json.dump method couldn't handle datetime objects. It seems the CLI also had this issue and implemented a json_encoder util method to handle it. I've refactored the wizards to use this in all places where something is being rendered as JSON.

@JordonPhillips @kyleknap @jamesls

screen shot 2016-07-27 at 17 08 14

return obj


def formatted_json(response):
Copy link
Contributor

Choose a reason for hiding this comment

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

function names should be actions, so format_json

@joguSD joguSD force-pushed the info-select branch 3 times, most recently from 06a152c to f698af3 Compare August 29, 2016 18:04
return obj


def format_json(response):
Copy link
Contributor

Choose a reason for hiding this comment

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

Simple though this one-line function is, it should still have a test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was being implicitly tested through one of the Environment's unit tests, but I agree an explicit test for this too makes sense.

@JordonPhillips
Copy link
Contributor

Other than that one test,

@joguSD joguSD force-pushed the info-select branch 2 times, most recently from be62166 to b83831a Compare August 30, 2016 22:55
@JordonPhillips
Copy link
Contributor

--    .-""-.
   ) (     )
  (   )   (
     /     )
    (_    _)                     0_,-.__
      (_  )_                     |_.-._/
       (    )                    |_--..\
        (__)                     |__--_/
     |''   ``\                   |
     |        \                  |      /b.
     |         \  ,,,---===?A`\  |  ,==y'
   ___,,,,,---==""\        |M] \ | ;|\ |>
           _   _   \   ___,|H,,---==""""bno,
    o  O  (_) (_)   \ /          _     AWAW/
                     /         _(+)_  dMM/
      \@_,,,,,,---=="   \      \\|//  MW/
--''''"                         ===  d/
                                    //
                                    ,'__________________________
   \    \    \     \               ,/~~~~~~~~~~~~~~~~~~~~~~~~~~~
                         _____    ,'  ~~~   .-""-.~~~~~~  .-""-.
      .-""-.           ///==---   /`-._ ..-'      -.__..-'
            `-.__..-' =====\\\\\\ V/  .---\.
                      ~~~~~~~~~~~~, _',--/_.\  .-""-.
                            .-""-.___` --  \|         -.__..-

@joguSD joguSD merged commit 96852f1 into awslabs:wizard-feature Aug 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants