Skip to content

Remove now irrelevant jsx v3 stuff from editor tooling #7158

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 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions analysis/src/CompletionBackEnd.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1816,9 +1816,6 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
let keyLabels =
if Utils.startsWith "key" prefix then [mkLabel ("key", "string")] else []
in
(* We always try to look up completion from the actual domProps type first.
This works in JSXv4. For JSXv3, we have a backup hardcoded list of dom
labels we can use for completion. *)
let pathToElementProps = TypeUtils.pathToElementProps package in
if Debug.verbose () then
Printf.printf
Expand Down Expand Up @@ -1852,12 +1849,7 @@ let rec processCompletable ~debug ~full ~scope ~env ~pos ~forHover completable =
Printf.printf
"[completing-lowercase-jsx] could not find element props to complete \
from.\n";
(CompletionJsx.domLabels
|> List.filter (fun (name, _t) ->
Utils.startsWith name prefix
&& (forHover || not (List.mem name identsSeen)))
|> List.map mkLabel)
@ keyLabels)
keyLabels)
| Cjsx (componentPath, prefix, identsSeen) ->
let labels =
CompletionJsx.getJsxLabels ~componentPath ~findTypeOfValue ~package
Expand Down
Loading