Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Gate Batch Change UI based on license#52113

Merged
st0nebreaker merged 13 commits into
mainfrom
becca/bc-ui-gating-bugfix
May 25, 2023
Merged

Gate Batch Change UI based on license#52113
st0nebreaker merged 13 commits into
mainfrom
becca/bc-ui-gating-bugfix

Conversation

@st0nebreaker

@st0nebreaker st0nebreaker commented May 17, 2023

Copy link
Copy Markdown
Contributor

Closes #49714

Test plan

  • Run sg start oss - observe missing batch changes nav item (route is inaccessible too)
  • Run sg start dotcom - observe batch changes page, only the Get started content displays (subrotues are inaccessible)
  • Mock enterprise with limited batch changes - observe limited batch change warning once executing a SSBC

@st0nebreaker st0nebreaker self-assigned this May 17, 2023
@cla-bot cla-bot Bot added the cla-signed label May 17, 2023
Comment thread client/web/src/main.tsx
@sourcegraph-buildkite

sourcegraph-buildkite commented May 17, 2023

Copy link
Copy Markdown
Collaborator

Bundle size report 📦

Initial size Total size Async size Modules
0.00% (+0.03 kb) 0.00% (+0.11 kb) 0.00% (+0.08 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits 1bba6c5 and 055019e or learn more.

Open explanation
  • Initial size is the size of the initial bundle (the one that is loaded when you open the page)
  • Total size is the size of the initial bundle + all the async loaded chunks
  • Async size is the size of all the async loaded chunks
  • Modules is the number of modules in the initial bundle

@st0nebreaker st0nebreaker marked this pull request as ready for review May 18, 2023 00:10
@st0nebreaker st0nebreaker requested a review from a team May 18, 2023 00:10
@sourcegraph-bot

sourcegraph-bot commented May 18, 2023

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 0294b63...1bba6c5.

Notify File(s)
@BolajiOlajide client/web/src/enterprise/batches/list/BatchChangeListPage.story.tsx
client/web/src/enterprise/batches/list/BatchChangeListPage.tsx
client/web/src/enterprise/batches/list/BatchChangesListIntro.tsx
@courier-new client/web/src/enterprise/batches/list/BatchChangeListPage.story.tsx
client/web/src/enterprise/batches/list/BatchChangeListPage.tsx
client/web/src/enterprise/batches/list/BatchChangesListIntro.tsx
@eseliger client/web/src/enterprise/batches/list/BatchChangeListPage.story.tsx
client/web/src/enterprise/batches/list/BatchChangeListPage.tsx
client/web/src/enterprise/batches/list/BatchChangesListIntro.tsx

@sourcegraph-bot

sourcegraph-bot commented May 18, 2023

Copy link
Copy Markdown
Contributor

📖 Storybook live preview

Comment thread client/web/src/enterprise/batches/list/BatchChangeListPage.tsx Outdated
Comment thread client/web/src/enterprise/batches/list/backend.ts
Comment thread client/web/src/enterprise/batches/list/BatchChangeListPage.tsx Outdated
Comment thread client/web/src/nav/GlobalNavbar.tsx Outdated
Comment thread client/web/src/nav/GlobalNavbar.tsx Outdated
@st0nebreaker st0nebreaker requested a review from courier-new May 19, 2023 17:26
@courier-new

Copy link
Copy Markdown
Contributor

Looks great! I think there might just be a couple tests and Storybook stories we need to update to include this extra window context so that they continue to capture the same scenario. You can view the Buildkite failure and Chromatic diff to see which tests/stories need the added context. I think you should just be able to write to window.context.batchChanges directly for those tests/stories.

@st0nebreaker st0nebreaker force-pushed the becca/bc-ui-gating-bugfix branch from c6a6c60 to 55e019b Compare May 22, 2023 22:48
@st0nebreaker st0nebreaker enabled auto-merge (squash) May 22, 2023 22:48
@st0nebreaker st0nebreaker force-pushed the becca/bc-ui-gating-bugfix branch from 55e019b to 46c6c9a Compare May 22, 2023 23:26
Comment thread client/web/src/enterprise/batches/list/BatchChangeListPage.story.tsx Outdated
Comment thread client/web/src/nav/GlobalNavbar.tsx
st0nebreaker and others added 2 commits May 23, 2023 13:12
…ry.tsx

Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
@st0nebreaker st0nebreaker disabled auto-merge May 23, 2023 20:05
@st0nebreaker st0nebreaker requested a review from courier-new May 23, 2023 20:05

@courier-new courier-new left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Whew okay, sorry, the Storybook thing is a liiiiiittle more complicated than we hoped. 😬

Comment thread client/web/src/enterprise/batches/list/BatchChangeListPage.story.tsx Outdated

@courier-new courier-new left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for so patiently working through all this with me! 🙌

Comment thread client/shared/src/testing/searchContexts/testHelpers.ts Outdated
Comment thread client/shared/src/testing/searchContexts/testHelpers.ts Outdated
Comment thread client/shared/src/testing/searchContexts/testHelpers.ts Outdated
@st0nebreaker st0nebreaker force-pushed the becca/bc-ui-gating-bugfix branch from 161d91f to b470f33 Compare May 25, 2023 15:24
@st0nebreaker st0nebreaker enabled auto-merge (squash) May 25, 2023 15:25
@st0nebreaker st0nebreaker force-pushed the becca/bc-ui-gating-bugfix branch from 2bc93c7 to 1bba6c5 Compare May 25, 2023 17:04
@st0nebreaker st0nebreaker merged commit c37d944 into main May 25, 2023
@st0nebreaker st0nebreaker deleted the becca/bc-ui-gating-bugfix branch May 25, 2023 17:17
ErikaRS pushed a commit that referenced this pull request Jun 22, 2023
Closes #49714
- Uses new batch change licensing info exposed on the JS Context (from
#52044)
- Hides Batch Change nav item on OSS
- Shows Get Started page for dotcom & enterprise customers without a
Batch Changes license

## Test plan
- Run `sg start oss` - observe missing batch changes nav item (route is
inaccessible too)
- Run `sg start dotcom` - observe batch changes page, only the `Get
started` content displays (subrotues are inaccessible)
- Mock enterprise with limited batch changes - observe limited batch
change warning once executing a SSBC

---------

Co-authored-by: Kelli Rockwell <kelli@sourcegraph.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Batch Changes tab is visible on OSS installs

4 participants