okteto / docker-desktop-extension

Docker Extension for Okteto
Apache License 2.0
5 stars 4 forks source link

Add relaunch button on environment tab #82

Closed HeartBeat1608 closed 2 years ago

HeartBeat1608 commented 2 years ago

Fixes Issue

Closes #70

Changes proposed

Added a "Relaunch" Button to relaunch the active environment. This uses the existing functions to perform the said action, hence does not require additional tests. Existing tests and Manual tests have passed and approved.

Check List (Check all the applicable boxes)

Screenshots

Screenshot (5)

Note to reviewers

Signed-off-by: heartbeat1608 heartbeatanna1608@gmail.com

HeartBeat1608 commented 2 years ago

Sure. I'll make changes to this PR.

On Mon, Oct 17, 2022, 13:10 Ramón Lamana @.***> wrote:

@.**** commented on this pull request.

In client/src/contexts/Okteto.context.tsx https://github.com/okteto/docker-desktop-extension/pull/82#discussion_r996708357 :

}

interface OktetoStore {

  • currentContext: OktetoContext | null
  • contextList: OktetoContextList
  • environment: OktetoEnvironment | null
  • output: string
  • loading: boolean
  • ready: boolean
  • login: () => void
  • stopEnvironment: () => void,
  • selectEnvironment: (f: string, withBuild: boolean) => void
  • selectContext: (f: string) => void
  • currentContext: OktetoContext | null;

It seems you are using your own linter / prettier configuration. We are working on adding a specific linter config for this project, but until then can you send a PR with only the changes related to the issue?

— Reply to this email directly, view it on GitHub https://github.com/okteto/docker-desktop-extension/pull/82#pullrequestreview-1143639757, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALGJXW7QLVRJCZEGHTGEBQ3WDT7GLANCNFSM6AAAAAAREE4Y24 . You are receiving this because you authored the thread.Message ID: @.***>

rlamana commented 2 years ago

@HeartBeat1608 This is great, thanks for contributing! I left a few comments that should get fixed before merging.

HeartBeat1608 commented 2 years ago

I've add the required color to the button from the color palette. Also updated the prettier config to reflect the changes I made. Should help make the codebase consistent in styling.

For Reviewer

The actual implementation is as follows: File Line Range Comments
Environment.tsx 87 to 100 Add Relaunch button to the UI
Okteto.context.ts 111 to 123 Implement the relaunchEnvironment method
prettierrc.json most Add Prettier Config with standard settings
HeartBeat1608 commented 2 years ago

@rlamana Updated the code with the appropriate formatting. Do check it out. Uses the same functionality but with the original strucutre of the code.

rlamana commented 2 years ago

This is looking good. I will be testing it end to end today before approving and merging it. Thanks for the contribution!

HeartBeat1608 commented 2 years ago

Made the changes. The comment was for me to not forget the idea behind the function itself. It basically had nothing to do with the documentation.

rlamana commented 2 years ago

@HeartBeat1608 with my suggestion about the button color I think this is ready to be merged

HeartBeat1608 commented 2 years ago

@rlamana All Requested changes done.

rlamana commented 2 years ago

LGTM! Thanks for the contribution @HeartBeat1608