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

remove many removed and unused fields from settings and site config schemas#46045

Merged
sqs merged 1 commit into
mainfrom
sqs/rm-many-fields-from-schemas
Jan 2, 2023
Merged

remove many removed and unused fields from settings and site config schemas#46045
sqs merged 1 commit into
mainfrom
sqs/rm-many-fields-from-schemas

Conversation

@sqs

@sqs sqs commented Jan 2, 2023

Copy link
Copy Markdown
Member

The intent of this commit is to only remove fields that are:

  • entirely ineffective (such as those documented with "REMOVED")
  • long-deprecated where the functionality is no longer present
  • deprecated and replaced with another property that has the same effect

The intent is not to remove any fields that are in active use. As evidence of this, you can see that very little non-test, non-schema code was changed here.

This is a followup to https://github.com/sourcegraph/sourcegraph/pull/45995.

Test plan

The integration test suite will catch any issues.

@sqs sqs requested a review from a team January 2, 2023 20:05
@cla-bot cla-bot Bot added the cla-signed label Jan 2, 2023
@sqs sqs requested a review from a team January 2, 2023 20:05
@sourcegraph-bot

sourcegraph-bot commented Jan 2, 2023

Copy link
Copy Markdown
Contributor

Codenotify: Notifying subscribers in CODENOTIFY files for diff 323638f...b082408.

Notify File(s)
@beyang internal/search/job/jobutil/job_test.go
@camdencheek internal/search/job/jobutil/job_test.go
@keegancsmith cmd/frontend/graphqlbackend/search_results_test.go
internal/search/job/jobutil/job_test.go
@rvantonder cmd/frontend/graphqlbackend/search_results_test.go
@unknwon dev/gqltest/search_test.go

@sg-e2e-regression-test-bob

sg-e2e-regression-test-bob commented Jan 2, 2023

Copy link
Copy Markdown

Bundle size report 📦

Initial size Total size Async size Modules
-0.01% (-0.16 kb) -0.07% (-10.74 kb) 🔽 -0.09% (-10.57 kb) 🔽 0.00% (0)

Look at the Statoscope report for a full comparison between the commits b082408 and 45cd517 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

@sqs sqs force-pushed the sqs/rm-many-fields-from-schemas branch from 5b790bd to 1df17d4 Compare January 2, 2023 20:45
…chemas

The intent of this commit is to only remove fields that are:

- entirely ineffective (such as those documented with "REMOVED")
- long-deprecated where the functionality is no longer present
- deprecated and replaced with another property that has the same effect

The intent is not to remove any fields that are in active use.
@sqs sqs force-pushed the sqs/rm-many-fields-from-schemas branch from 1df17d4 to b082408 Compare January 2, 2023 21:25
@limitedmage

Copy link
Copy Markdown
Contributor

Does this close the three issues mentioned here: https://github.com/sourcegraph/sourcegraph/discussions/45232#discussioncomment-4318274 ?

@sqs

sqs commented Jan 2, 2023

Copy link
Copy Markdown
Member Author

@limitedmage:

Does this close the three issues mentioned here: #45232 (comment) ?

Yes to the first 2, and I posted https://github.com/sourcegraph/sourcegraph/issues/44182#issuecomment-1369219243 on the 3rd.

@limitedmage limitedmage 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.

This PR makes me soooo happy! Thank you!!

@sqs

sqs commented Jan 2, 2023

Copy link
Copy Markdown
Member Author

@limitedmage Yes, same here! 🎉 Thanks for the review!

@sqs sqs merged commit 75f7e44 into main Jan 2, 2023
@sqs sqs deleted the sqs/rm-many-fields-from-schemas branch January 2, 2023 22:12
@mrnugget

mrnugget commented Jan 3, 2023

Copy link
Copy Markdown
Contributor

ⓝⓘⓒⓔ!

fkling added a commit that referenced this pull request Feb 22, 2023
…flags

These flags have been removed in #46086 and #46045 but were
accidentally(?) added back to the schema in (#46086).

Furthermore the `showSearchContext` flag was still accessed in a couple
of places, resulting in a broken experience if it was set to `false`
(see screenshot).

This PR removes the flags and removes all uses of `showSearchContext`
flag.
fkling added a commit that referenced this pull request Feb 22, 2023
…flags (#47956)

These flags have been removed in #46086 and #46045 but were
accidentally (merge conflict?) added back to the schema in #46086.

Furthermore the `showSearchContext` flag was still accessed in a couple
of places, resulting in a broken experience if it was set to `false`.


This PR removes the flags and removes all uses of `showSearchContext`
flag.

## Test plan

`grep`ed for the removed flags (`showSearchContext` is still used as
props in various places though).
Opened web app and verified that the context dropdown is properly
populated.
fkling added a commit that referenced this pull request Feb 23, 2023
This flag had been removed in #46045 but (accidentally?) added
back in #45705. The feature (search stats) itself been removed in
 #45996. Documentation about it has already been removed in #30564. The
link removed in this PR has been dead since then.
fkling added a commit that referenced this pull request Feb 24, 2023
This flag had been removed in #46045 but (accidentally?) added back in
#45705. The feature (search stats) itself been removed in #45996.
Documentation about it has already been removed in #30564. The link
removed in this PR has been dead since then.

## Test plan

`grep`ped the code for references to the flag and used sourcegraph to
find the commits that made changes to the related code and
documentation.
fkling added a commit that referenced this pull request Mar 20, 2023
Originally I wanted to do properly pass in the `globbing` parameter but
then I noticed that this feature had been removed for quite a while
(#27886, #46045).
But while working on this I noticed that the cursor is not properly
scrolled into view when completing a long value. Adding `scrollIntoView`
fixes that.
philipp-spiess referenced this pull request Mar 20, 2023
As @fkling noticed in #49684, these option is no longer supported:

- https://github.com/sourcegraph/sourcegraph/pull/27886
- https://github.com/sourcegraph/sourcegraph/pull/46045

Time to do some cleanup in the front end code!
fkling added a commit that referenced this pull request Mar 20, 2023
#49684)

Originally I wanted to do properly pass in the `globbing` parameter but
then I noticed that this feature had been removed for quite a while
(#27886, #46045).
But while working on this I noticed that the cursor is not properly
scrolled into view when completing a long value. Adding `scrollIntoView`
fixes that.


## Test plan

Enter a long query into the input, type `file:` and select a long file
suggestion. The input should scroll the cursor into view.

## App preview:

- [Web](https://sg-web-fkling-search-input-globbing.onrender.com/search)

Check out the [client app preview
documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews)
to learn more.
github-actions Bot pushed a commit that referenced this pull request Mar 20, 2023
#49684)

Originally I wanted to do properly pass in the `globbing` parameter but
then I noticed that this feature had been removed for quite a while
(#27886, #46045).
But while working on this I noticed that the cursor is not properly
scrolled into view when completing a long value. Adding `scrollIntoView`
fixes that.

## Test plan

Enter a long query into the input, type `file:` and select a long file
suggestion. The input should scroll the cursor into view.

## App preview:

- [Web](https://sg-web-fkling-search-input-globbing.onrender.com/search)

Check out the [client app preview
documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews)
to learn more.

(cherry picked from commit 87b738d)
fkling added a commit that referenced this pull request Mar 20, 2023
…after completion (#49689)

Originally I wanted to do properly pass in the `globbing` parameter but
then I noticed that this feature had been removed for quite a while
(#27886, #46045).
But while working on this I noticed that the cursor is not properly
scrolled into view when completing a long value. Adding `scrollIntoView`
fixes that.


## Test plan

Enter a long query into the input, type `file:` and select a long file
suggestion. The input should scroll the cursor into view.

Co-authored-by: Felix Kling <felix@felix-kling.de>
philipp-spiess referenced this pull request Mar 21, 2023
As @fkling noticed in #49684, these option is no longer supported:

- https://github.com/sourcegraph/sourcegraph/pull/27886
- https://github.com/sourcegraph/sourcegraph/pull/46045

Time to do some cleanup in the front end code!

Process:

- Grep for `globbing`
- Delete everything that is related to front end code

## Test plan

- CI

<!-- All pull requests REQUIRE a test plan:
https://docs.sourcegraph.com/dev/background-information/testing_principles
-->

## App preview:

- [Web](https://sg-web-ps-rm-globbing-from-frontend.onrender.com/search)

Check out the [client app preview
documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews)
to learn more.
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.

Clean up settings experimental feature from deprecated feature flags Settings: Remove additionalFields json validation field

5 participants