Skip to content
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

feature: implement object list view filters #4434

Conversation

norbert-mieczkowski-codilime
Copy link
Collaborator

@norbert-mieczkowski-codilime norbert-mieczkowski-codilime commented Sep 12, 2023

Closes: #3583

What's Changed

Implement ObjecList view filters in FiltersPanelContent component. Additionally, fix some minor existing component lifecycle and style issues for the feature to work correctly.

filters_panel

TODO

@bryanculver
Copy link
Member

@norbert-mieczkowski-codilime Wherever there is something that needs to be reviewed (your TODO comments above) since we may feature branch this

Copy link
Member

@bryanculver bryanculver left a comment

Choose a reason for hiding this comment

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

Looks good. Please add a changelog fragment.

While you're at it, can you fix the spacing on the panel:
image

nautobot/ui/src/components/FiltersPanel.js Outdated Show resolved Hide resolved
@norbert-mieczkowski-codilime
Copy link
Collaborator Author

Right, the spacing you mentioned is something I'd like to discuss further before changing it here.

nautobot/ui/src/components/FiltersPanel.js Outdated Show resolved Hide resolved
nautobot/ui/src/components/FiltersPanel.js Outdated Show resolved Hide resolved
nautobot/ui/src/components/FiltersPanel.js Outdated Show resolved Hide resolved
nautobot/ui/src/utils/api.js Show resolved Hide resolved
@bryanculver
Copy link
Member

Right, the spacing you mentioned is something I'd like to discuss further before changing it here.

Being addressed in #4458

@bryanculver bryanculver changed the base branch from develop to feature/new-ui-filtering September 15, 2023 13:50
content: <Text>You have successfully opened filters panel.</Text>,
content: (
<FiltersPanelContent
// TODO(norbert-mieczkowski-codilime): use actual lookup fields rather than table headers
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need help from others on implementing the REST API to retrieve the lookup fields?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Likely, I don't feel proficient in the Nautobot backend enough to do it myself

Copy link
Member

Choose a reason for hiding this comment

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

Tracking as a new story

@bryanculver
Copy link
Member

We'll work on #4462 to take this the rest of the way. Merge this into a feature branch to move forward.

@bryanculver bryanculver merged commit c38f59f into feature/new-ui-filtering Sep 21, 2023
21 checks passed
@bryanculver bryanculver deleted the u/norbert-mieczkowski-codilime-3583-implement-object-list-view-filters branch September 21, 2023 17:48
bryanculver added a commit that referenced this pull request Sep 27, 2023
* feature: implement object list view filters (#4434)

* feature: implement object list view filters

* fix: typo

* chore: add changelog

* chore: update non filter query params in the new ui

* Added `object_type` to metadata output when performing an `OPTIONS` query.

* feature: use dynamic object type in filter lookup type queries

* Addressing feedback

---------

Co-authored-by: jathanism <jathan@gmail.com>
Co-authored-by: Bryan Culver <bryan.culver@networktocode.com>

* New UI - Add Live Search (#4463)

* feature: implement object list view filters

* fix: typo

* chore: add changelog

* chore: update non filter query params in the new ui

* Added `object_type` to metadata output when performing an `OPTIONS` query.

* feature: use dynamic object type in filter lookup type queries

* Addressing feedback

* Add prototype live search

* Fix memoization, handle global search, detail view redirect.

* Added changelog fragment

* Address feedback

---------

Co-authored-by: Norbert Mieczkowski <norbert.mieczkowski@codilime.com>
Co-authored-by: jathanism <jathan@gmail.com>

* Add filterset schema to rest api (#4521)

* automatically populate filter type when only one option is available

* Update nautobot/core/api/metadata.py

Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com>

* Update nautobot/core/api/metadata.py

Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com>

* Remove errorant changlog add. Remove style bug fixed upstream

---------

Co-authored-by: Norbert Mieczkowski <117445994+norbert-mieczkowski-codilime@users.noreply.github.com>
Co-authored-by: jathanism <jathan@gmail.com>
Co-authored-by: Norbert Mieczkowski <norbert.mieczkowski@codilime.com>
Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com>
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.

Parse Filter Schema Definitions to React Filter Panel Components
4 participants