Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(site): connect open_in parameter #16036

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

Merged
merged 7 commits into from
Jan 7, 2025
Merged

feat(site): connect open_in parameter #16036

merged 7 commits into from
Jan 7, 2025

Conversation

defelmnq
Copy link
Contributor

@defelmnq defelmnq commented Jan 3, 2025

Second step to resolve open_in issue

This PR improves the way the open_in parameter is forwarded across the code, changing the last string to const everywhere.

Also make sure it is available and forwarded up to the CreateLink component.

@defelmnq defelmnq marked this pull request as ready for review January 6, 2025 10:48
@defelmnq defelmnq requested review from dannykopping and removed request for spikecurtis January 6, 2025 10:48
@@ -64,6 +65,7 @@ func TestManifest(t *testing.T) {
},
Health: codersdk.WorkspaceAppHealthInitializing,
Hidden: true,
OpenIn: codersdk.WorkspaceAppOpenInTab,
Copy link
Member

Choose a reason for hiding this comment

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

We changed the test inputs and it passes with no futher changes? Are we not checking for this in the test?
Should we also add a test with an invalid value for OpenIn?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I indeed will add some more tests 👀

@defelmnq defelmnq requested a review from spikecurtis January 7, 2025 05:52
@@ -518,6 +518,7 @@ func Apps(dbApps []database.WorkspaceApp, agent database.WorkspaceAgent, ownerNa
},
Health: codersdk.WorkspaceAppHealth(dbApp.Health),
Hidden: dbApp.Hidden,
OpenIn: codersdk.WorkspaceAppOpenIn(dbApp.OpenIn),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This piece is the most important of the PR - basically extracting data from the db to make them be visible in the SDK and API calls.

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

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

I think your description might need updating now.

Also:

Also make sure it is available and forwarded up to the CreateLink component.

Is this present?

Nit:
This PR almost feels too small now; I'm happy to merge it as-is but it might make more sense to combine this change with the new frontend behavior so it's all logically grouped instead of spread out over several PRs.

Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

Approving to unblock; would still like to see a couple of additional tests but no other major blockers from my side.

@defelmnq defelmnq merged commit 289338f into main Jan 7, 2025
33 of 35 checks passed
@defelmnq defelmnq deleted the open_in_fe branch January 7, 2025 17:08
@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2025
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.

Opening a coder_app in a new browser window is awkward
4 participants