Skip to content

feat: allow to search only for locations - #1608

Open
lpiepiora wants to merge 1 commit into
sysadminsmedia:mainfrom
lpiepiora:feat/search-locations
Open

feat: allow to search only for locations#1608
lpiepiora wants to merge 1 commit into
sysadminsmedia:mainfrom
lpiepiora:feat/search-locations

Conversation

@lpiepiora

Copy link
Copy Markdown
Contributor

What type of PR is this?

(REQUIRED)

  • feature

What this PR does / why we need it:

This feature adds a switch to search only for locations. There is already handling in the backend, but it was never propagated.

This is useful, because now with extendable entity types, we can create stuff like boxes, which are more dynamic in their nature. Having that different entity types it's beneficial to search for them.

Screenshot 2026-07-10 at 06 33 33

Which issue(s) this PR fixes:

There is no issue.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 615d17de-7eae-4a90-a4f5-f6fde633b3ca

📥 Commits

Reviewing files that changed from the base of the PR and between 45e2272 and d8c424e.

📒 Files selected for processing (3)
  • frontend/lib/api/classes/items.ts
  • frontend/locales/en.json
  • frontend/pages/items.vue
✅ Files skipped from review due to trivial changes (2)
  • frontend/lib/api/classes/items.ts
  • frontend/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/pages/items.vue

Summary by CodeRabbit

  • New Features

    • Added an “Only locations” filter to the items page.
    • Filter selections are preserved in the page URL and applied to item searches.
  • Bug Fixes

    • Improved filter updates to ensure searches refresh consistently when options change.

Walkthrough

The items page adds an optional isLocation filter, synchronizes it with the route query, includes it in API requests, refactors related search watchers, and exposes a localized filter switch.

Changes

Location Filter

Layer / File(s) Summary
Query and API integration
frontend/lib/api/classes/items.ts, frontend/pages/items.vue
The items query type and search flow now carry isLocation through route state and api.items.getAll requests.
Filter reactivity and UI
frontend/pages/items.vue, frontend/locales/en.json
A shared watcher handles search-triggering filters, and the filter popover adds the localized “Only locations” switch.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant FilterPopover
  participant ItemsPage
  participant Router
  participant ItemsAPI
  FilterPopover->>ItemsPage: Toggle isLocation
  ItemsPage->>Router: Update route query
  ItemsPage->>ItemsAPI: Request filtered items
Loading

Possibly related PRs

Suggested labels: ⬆️ enhancement

Suggested reviewers: tankerkiller125, tonyaellie

Poem

A location switch now lights the way,
Through route and API it journeys away.
Watchers listen, filters align,
“Only locations” makes the search fine.
📍 Items sort into their place.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding location-only search support.
Description check ✅ Passed The description covers the PR type, purpose, and issue status, and is mostly complete for the provided template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code

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

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

@coderabbitai
coderabbitai Bot requested a review from tonyaellie July 10, 2026 04:47
@coderabbitai coderabbitai Bot added the ⬆️ enhancement New feature or request label Jul 10, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/locales/pl.json`:
- Line 565: Remove the added "is_location" entry from frontend/locales/pl.json,
keeping the new translation key only in frontend/locales/en.json; do not modify
non-English locale files because Weblate manages those translations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1dc9bc07-206a-4600-82dd-8ba56c17a78c

📥 Commits

Reviewing files that changed from the base of the PR and between b7ad136 and 45e2272.

📒 Files selected for processing (4)
  • frontend/lib/api/classes/items.ts
  • frontend/locales/en.json
  • frontend/locales/pl.json
  • frontend/pages/items.vue

Comment thread frontend/locales/pl.json Outdated
@lpiepiora
lpiepiora force-pushed the feat/search-locations branch from 45e2272 to d8c424e Compare July 10, 2026 05:02
@coderabbitai
coderabbitai Bot requested a review from tankerkiller125 July 10, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⬆️ enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant