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

chore(workspaces): create button and test #3586

Merged
merged 12 commits into from
Aug 9, 2024
Merged

Conversation

jaikamat
Copy link
Contributor

@jaikamat jaikamat commented Aug 7, 2024

Summary

This PR creates a new button in the AppBar component that will navigate to the Workspaces page.

image
2024-08-07 15 52 24

Additional comments inline.

@jaikamat jaikamat added 👨‍🎨 Status: UI/UX Review Requires review from design team 🚀 Type: New Feature Something new labels Aug 7, 2024
@jaikamat jaikamat self-assigned this Aug 7, 2024
Copy link

changeset-bot bot commented Aug 7, 2024

🦋 Changeset detected

Latest commit: 4e93bf8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 36 packages
Name Type
@commercetools-frontend/application-shell Minor
@commercetools-frontend/constants Minor
@commercetools-frontend/cypress Minor
@commercetools-applications/merchant-center-template-starter-typescript Minor
@commercetools-applications/merchant-center-template-starter Minor
@commercetools-applications/merchant-center-custom-view-template-starter-typescript Minor
@commercetools-applications/merchant-center-custom-view-template-starter Minor
@commercetools-local/playground Minor
@commercetools-local/visual-testing-app Minor
@commercetools-frontend/actions-global Minor
@commercetools-frontend/application-components Minor
@commercetools-frontend/application-config Minor
@commercetools-frontend/application-shell-connectors Minor
@commercetools-frontend/mc-html-template Minor
@commercetools-frontend/mc-scripts Minor
@commercetools-frontend/react-notifications Minor
@commercetools-frontend/sdk Minor
@commercetools-frontend/sentry Minor
@commercetools-website/components-playground Minor
@commercetools-frontend/codemod Minor
@commercetools-frontend/mc-dev-authentication Minor
@commercetools-frontend/permissions Minor
@commercetools-frontend/i18n Minor
@commercetools-frontend/l10n Minor
@commercetools-backend/eslint-config-node Minor
@commercetools-backend/express Minor
@commercetools-backend/loggers Minor
@commercetools-frontend/assets Minor
@commercetools-frontend/babel-preset-mc-app Minor
@commercetools-frontend/browser-history Minor
@commercetools-frontend/create-mc-app Minor
@commercetools-frontend/eslint-config-mc-app Minor
@commercetools-frontend/jest-preset-mc-app Minor
@commercetools-frontend/jest-stylelint-runner Minor
@commercetools-frontend/notifications Minor
@commercetools-frontend/url-utils Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Aug 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mc-app-kit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2024 7:14pm
merchant-center-application-kit-components-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 8, 2024 7:14pm


export const FLAGS = {};

// Long-lived feature flags, defined in the MC API.
export const DEFAULT_FLAGS = {
[CUSTOM_VIEWS]: { value: true },
[ENABLE_WORKSPACES_UI]: { value: false },
Copy link
Contributor Author

@jaikamat jaikamat Aug 7, 2024

Choose a reason for hiding this comment

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

Reviewers - to see this in action locally, toggle to true

@jaikamat jaikamat added Passes UI/UX review and removed 👨‍🎨 Status: UI/UX Review Requires review from design team labels Aug 7, 2024
Comment on lines 45 to 51
/**
* If we don't have a project key, there's no way to navigate to the workspaces page in the fallback application.
* Once Workspaces lives in a centralized location, we can navigate to that specific URL.
*
* TODO: Reevaluate this after the iterative launcher / junior is released.
*/
if (!projectKey) return null;
Copy link
Member

Choose a reason for hiding this comment

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

I'm confused. Isn't the workspaces URI path /workspaces? There is no need for a project key...

cc @ByronDWall

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 too am confused - I assumed we needed the project key for Junior since it's hosted in the fallback application (for now)

Copy link
Contributor

Choose a reason for hiding this comment

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

There is some ongoing work to update the proxy to handle /workspaces as a requested path. From the RFC:

workspaces should be added to the staticUriPathsInPositionOfProjectKey array in the get-proxy-target-for-application util. Tests for proxy behavior when request path only contains the first position "projectKey" should be updated to test for correct behavior when the requested path is workspaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The routing can handle either /:projectKey/workspaces or /workspaces - will adjust accordingly

Copy link
Contributor

Choose a reason for hiding this comment

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

The client-side router in application-fallback can handle either /:projectKey/workspaces or /workspaces.

The URI path is /workspaces without the project key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ByronDWall @emmenko See c2b0dc9 for a simplified approach

Copy link
Contributor

@tylermorrisford tylermorrisford left a comment

Choose a reason for hiding this comment

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

Beauty

@jaikamat jaikamat merged commit d4a26cd into main Aug 9, 2024
19 checks passed
@jaikamat jaikamat deleted the FCT-workspaces-button branch August 9, 2024 13:19
@ct-changesets ct-changesets bot mentioned this pull request Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants