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

search contexts: order contexts list by default first, then starred, then others#44876

Merged
limitedmage merged 8 commits into
jp/rehashautodefinedcontextsfrom
jp/sortcontexts
Nov 30, 2022
Merged

search contexts: order contexts list by default first, then starred, then others#44876
limitedmage merged 8 commits into
jp/rehashautodefinedcontextsfrom
jp/sortcontexts

Conversation

@limitedmage

@limitedmage limitedmage commented Nov 29, 2022

Copy link
Copy Markdown
Contributor

Stacked on #44875

Test plan

Verify search context dropdown is displayed in the right order. Added a new unit test for this.

@cla-bot cla-bot Bot added the cla-signed label Nov 29, 2022
@sourcegraph-bot

sourcegraph-bot commented Nov 29, 2022

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff e1095ba...161c29a.

Notify File(s)
@beyang internal/search/searchcontexts/search_contexts.go
@camdencheek internal/search/searchcontexts/search_contexts.go
@keegancsmith internal/search/searchcontexts/search_contexts.go

@sg-e2e-regression-test-bob

sg-e2e-regression-test-bob commented Nov 29, 2022

Copy link
Copy Markdown

Bundle size report 📦

Initial size Total size Async size Modules
-0.03% (-0.91 kb) -0.01% (-0.95 kb) -0.00% (-0.03 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits 161c29a and d61f40b 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

Comment thread internal/database/search_contexts.go Outdated

@camdencheek camdencheek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. The comment about getAuthenticatedUserId can be relegated to another PR or I can take care of it.

Comment thread internal/database/search_contexts.go Outdated
@limitedmage limitedmage merged commit c17b1ca into jp/rehashautodefinedcontexts Nov 30, 2022
@limitedmage limitedmage deleted the jp/sortcontexts branch November 30, 2022 17:51
limitedmage added a commit that referenced this pull request Nov 30, 2022
…rmal query (#44875)

* search contexts: remove autodefined contexts from frontend, add to normal query

* generate

* remove real global context, use union with dummy row instead

* fix some tests

* fix CountSearchContexts

* add test for CountSearchContexts

* search contexts: order contexts list by default first, then starred, then others (#44876)

* search contexts: order contexts list by default first, then starred, then others

* generate mocks

* Add test for new order

* explicit select and remove unused scan var

* simplify getting authenticated user

* fix go lint
limitedmage added a commit that referenced this pull request Dec 5, 2022
* db schema and graphql schema updates

* default contexts backend

* query for stars

* backend for settings stars and defaults

* sg generate

* fixes?

* add foreign keys

* idempotent constraints

* again

* search contexts: remove autodefined contexts from frontend, add to normal query (#44875)

* search contexts: remove autodefined contexts from frontend, add to normal query

* generate

* remove real global context, use union with dummy row instead

* fix some tests

* fix CountSearchContexts

* add test for CountSearchContexts

* search contexts: order contexts list by default first, then starred, then others (#44876)

* search contexts: order contexts list by default first, then starred, then others

* generate mocks

* Add test for new order

* explicit select and remove unused scan var

* simplify getting authenticated user

* fix go lint

* unit test for default contexts

* tests for starred contexts

* change graphql api to take user as param, add tests for this

* update db schema to make contraints prettier

* clean up db keys

* search contexts: update header in list page (#44966)

* search contexts: update header

* add back tab

* fix spacing

* fix action button width

* search contexts: table view in management page (#45001)

* search contexts: update header

* search contexts: table view in management page

* add menu

* fix build failure

* add back tab

* fix spacing

* fix action button width

* address minor issues from figma

* search contexts: card view for mobile (#45040)

* search contexts: card view for mobile

* fix build failure

* give up on sr-only mixin
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.

4 participants