Skip to content

Comments

Revert "feat(search): 22291 select area when location chosen (#1194)"#1248

Merged
Komzpa merged 1 commit intomainfrom
revert-22291
Aug 27, 2025
Merged

Revert "feat(search): 22291 select area when location chosen (#1194)"#1248
Komzpa merged 1 commit intomainfrom
revert-22291

Conversation

@albaranau
Copy link
Contributor

@albaranau albaranau commented Aug 27, 2025

This reverts commit 16eee94.

Summary by CodeRabbit

  • Refactor

    • Simplified search by removing on-hover map highlighting and the temporary highlight layer.
    • Selecting a result no longer outlines or focuses on the exact geometry; the map view updates to the area instead.
  • Documentation

    • Updated search documentation to reflect the removal of hover highlighting.
  • Chores

    • Cleaned up unused search highlighting logic and related infrastructure.

@albaranau albaranau requested a review from Komzpa August 27, 2025 11:38
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 27, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Removed the search-hover highlighting feature and its map layer. Deleted related atom, constants, renderer, layer initializer, and documentation. Stripped highlight side effects from SearchBar and search atoms. Search now skips geometry highlighting and focus-on-geometry; selection updates bbox only. Initialization of the highlight layer was removed from Search index.

Changes

Cohort / File(s) Summary of changes
Highlight state and constants removal
src/features/search/atoms/highlightedGeometry.ts, src/features/search/constants.ts
Deleted highlighted geometry atom and search highlight constants, including EMPTY_HIGHLIGHT, layer id, and color.
Renderer and layer initialization removal
src/features/search/renderers/SearchHighlightRenderer.ts, src/features/search/initSearchHighlightLayer.ts
Removed SearchHighlightRenderer class and the initSearchHighlightLayer module, including subscription to geometry atom and layer lifecycle logic.
Search UI component adjustments
src/features/search/componets/SearchBar/SearchBar.tsx, src/features/search/index.tsx
Removed imports, effects, and handlers related to highlighting; deleted init of highlight layer from Search entry component.
Search logic atom adjustments
src/features/search/searchAtoms.ts, src/features/search/searchLocationAtoms.ts
Removed highlight reset on selection; removed focus-on-geometry updates. Selection now sets bbox only.
Documentation
src/features/search/readme.md
Deleted README describing highlight behavior and related modules.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant U as User
  participant SB as SearchBar (UI)
  participant SA as searchAtoms
  participant HGA as searchHighlightedGeometryAtom
  participant L as initSearchHighlightLayer
  participant R as SearchHighlightRenderer
  participant M as Map

  rect rgb(235, 245, 255)
  note over U,SB: Previous flow (with hover highlight)
  U->>SB: Hover result
  SB->>HGA: Set hovered geometry
  opt Layer initialized
    L->>R: Mount renderer with GeoJSON source
    HGA-->>R: Subscription update (geometry)
    R->>M: Update layer source (highlight)
  end
  U->>SB: Select result
  SB->>SA: itemSelectAction
  SA->>M: Update view (focus/bbox)
  end
Loading
sequenceDiagram
  autonumber
  participant U as User
  participant SB as SearchBar (UI)
  participant SA as searchAtoms
  participant M as Map

  rect rgb(240, 255, 240)
  note over U,SB: New flow (highlight removed)
  U->>SB: Hover result
  note over SB: No highlight side effects
  U->>SB: Select result
  SB->>SA: itemSelectAction
  SA->>M: Update bbox only
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 44377fa and 6dece2f.

📒 Files selected for processing (9)
  • src/features/search/atoms/highlightedGeometry.ts (0 hunks)
  • src/features/search/componets/SearchBar/SearchBar.tsx (2 hunks)
  • src/features/search/constants.ts (0 hunks)
  • src/features/search/index.tsx (0 hunks)
  • src/features/search/initSearchHighlightLayer.ts (0 hunks)
  • src/features/search/readme.md (0 hunks)
  • src/features/search/renderers/SearchHighlightRenderer.ts (0 hunks)
  • src/features/search/searchAtoms.ts (0 hunks)
  • src/features/search/searchLocationAtoms.ts (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-22291

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link

Language To Recheck Fuzzy Untranslated Total
ar 3 216 837 1056
be 0 41 0 41
de 2 216 837 1055
es 3 216 837 1056
id 2 216 837 1055
ko 3 216 837 1056
ru 0 24 0 24
uk 0 18 799 817
zh 0 43 0 43

@albaranau albaranau requested a review from a team August 27, 2025 11:39
@github-actions
Copy link

Bundle size diff

Old size New size Diff
5.07 MB 5.06 MB -1.13 KB (-0.02%)

@github-actions
Copy link

Preview environments for this PR:

These previews are automatically updated with each commit.

Note: After a new deployment, it may take a few minutes for the changes to propagate and for caches to update. During this time, you might experience temporary loading issues or see an older version of the app. If the app fails to load, please wait a few minutes and try again.

@Komzpa Komzpa merged commit e112d77 into main Aug 27, 2025
13 of 16 checks passed
@Komzpa Komzpa deleted the revert-22291 branch August 27, 2025 11:40
@codecov
Copy link

codecov bot commented Aug 27, 2025

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 12.36%. Comparing base (44377fa) to head (6dece2f).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../features/search/componets/SearchBar/SearchBar.tsx 0.00% 5 Missing ⚠️
src/features/search/searchLocationAtoms.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1248      +/-   ##
==========================================
+ Coverage   12.32%   12.36%   +0.04%     
==========================================
  Files         728      724       -4     
  Lines       29952    29838     -114     
  Branches     1404     1400       -4     
==========================================
- Hits         3691     3690       -1     
+ Misses      25704    25594     -110     
+ Partials      557      554       -3     
Components Coverage Δ
UI Components 2.95% <ø> (ø)
Core Logic 17.21% <ø> (ø)
Features 2.56% <0.00%> (+0.01%) ⬆️
Utilities 44.60% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants