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

Enhanced terraform plan and terraform apply commands #246

Merged
merged 19 commits into from
May 3, 2024
Merged

Conversation

DavidS-ovm
Copy link
Contributor

@DavidS-ovm DavidS-ovm commented Apr 17, 2024

plan

@DavidS-ovm DavidS-ovm force-pushed the bubbletea-pt2 branch 2 times, most recently from 1bd9425 to 3efa0f4 Compare May 2, 2024 10:39
@DavidS-ovm DavidS-ovm marked this pull request as ready for review May 2, 2024 10:44
@DavidS-ovm DavidS-ovm changed the title Bubbletea pt2 Enhanced terraform plan and terraform apply commands May 2, 2024
Copy link
Member

@dylanratcliffe dylanratcliffe left a comment

Choose a reason for hiding this comment

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

This is awesome and I'm keen to get this merged, though I think there are some things we can improve:

Wrapping

We seem to be wrapping at a fixed point regardless of the terminal width which leads to things like the below where the link has been wrapped, but because it was the CLI that wrapped it and not the terminal it messes up the link and when I click it I don't get the whole link

Screenshot 2024-05-02 at 4 52 52 PM

Authenticate with browser shows >1 time

When I tried locally I was shown the "Authenticate with a browser" more than once, I would have thought that once I had done this once I'd be fine

Screenshot 2024-05-02 at 4 53 59 PM

Inconsistent when previewing steps

At some stages it seems like we're showing a preview of the next step that is going to happen. Like here it looks like we're currently "Waiting for device auth..." and then next is "Configuring AWS Access":

Screenshot 2024-05-02 at 4 56 36 PM

I don't mind this but if we are going to preview what steps are coming next I think we should be consistent about it i.e. layout the whole process at the start, or just show thw current and past steps

Does it not wait for risks?

It didn't wait for risks for me, I'm assuming this just isn't done yet?

Improvement: Can we hide things that serve no purpose after they are done?

For example, all of the text that goes along with auth is useless once you've authenticated. You're not going to want to scroll back and see what it asked you to do. Is it possible to basically collapse this to just a single line like we already have that says authentication successful?

@DavidS-ovm DavidS-ovm force-pushed the bubbletea-pt2 branch 2 times, most recently from e546cef to 1e6ca7e Compare May 2, 2024 16:43
@DavidS-ovm
Copy link
Contributor Author

DavidS-ovm commented May 2, 2024

This is awesome and I'm keen to get this merged, though I think there are some things we can improve:

Wrapping

We seem to be wrapping at a fixed point regardless of the terminal width which leads to things like the below where the link has been wrapped, but because it was the CLI that wrapped it and not the terminal it messes up the link and when I click it I don't get the whole link
Screenshot 2024-05-02 at 4 52 52 PM

Fixed this in a37f679

Authenticate with browser shows >1 time

When I tried locally I was shown the "Authenticate with a browser" more than once, I would have thought that once I had done this once I'd be fine
Screenshot 2024-05-02 at 4 53 59 PM

fixed in 35254ed : don't display the auth message after the authentication succeeded.

Inconsistent when previewing steps

At some stages it seems like we're showing a preview of the next step that is going to happen. Like here it looks like we're currently "Waiting for device auth..." and then next is "Configuring AWS Access":
Screenshot 2024-05-02 at 4 56 36 PM

I don't mind this but if we are going to preview what steps are coming next I think we should be consistent about it i.e. layout the whole process at the start, or just show thw current and past steps

I've added steps for "Planned Changes" and "Processing" (also update the gif above). This is pretty flexible and we can add and remove tasks to taste.

Does it not wait for risks?

It didn't wait for risks for me, I'm assuming this just isn't done yet?

I've changed the text on the link to mention risks:

Check the blast radius graph and risks at

We can add more waiting and more output after this if you want. My thinking here was that it gives folks something to look at (the graph) while they're waiting for the risk calculation.

Improvement: Can we hide things that serve no purpose after they are done?

For example, all of the text that goes along with auth is useless once you've authenticated. You're not going to want to scroll back and see what it asked you to do. Is it possible to basically collapse this to just a single line like we already have that says authentication successful?

Yes. See above change.

@DavidS-ovm
Copy link
Contributor Author

(updated the commit links above after rebasing)

@dylanratcliffe
Copy link
Member

Nice. Let's get this merged. I think I'm still going to have more design opinions but I'd like to tinker myself a bit to make sure they actually look good

@DavidS-ovm
Copy link
Contributor Author

DavidS-ovm commented May 3, 2024 via email

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