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

fix(platform): Combine Sorting, Filtering, and Grouping Settings into a Single Dialog #12502

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dpavlenishvili
Copy link
Contributor

@dpavlenishvili dpavlenishvili commented Oct 3, 2024

Related Issue(s)

closes #12441 #12447 #12181

Description

This PR refactors the TableViewSettingsDialogComponent to combine sorting, filtering, and grouping functionality into a single dialog. Previously, sorting, filtering, and grouping were handled by separate dialogs, but now they are merged for a more streamlined user experience. This also reduces code duplication and improves maintainability.

Key changes:

  • Created a combined settings dialog for table view settings.
  • Refactored the sorting, filtering, and grouping functionalities using Angular signals for optimized state management.
  • Added support for sorting, filtering, and grouping in one interface.
  • Removed the logic from the individual sorting, filtering, and grouping dialogs and merged it into one component.
  • Updated tests to reflect the new combined dialog structure.
  • Adjusted documentation and examples to reflect the new functionality.

Screenshots

Before:

After:

Screen.Recording.2024-10-03.at.15.18.55.mov

@dpavlenishvili dpavlenishvili added code refactoring nice to have a nice to have feature/improvement labels Oct 3, 2024
@dpavlenishvili dpavlenishvili requested a review from a team October 3, 2024 11:22
@dpavlenishvili dpavlenishvili self-assigned this Oct 3, 2024
@dpavlenishvili dpavlenishvili linked an issue Oct 3, 2024 that may be closed by this pull request
2 tasks
Copy link

netlify bot commented Oct 3, 2024

Deploy Preview for fundamental-ngx ready!

Name Link
🔨 Latest commit 830debb
🔍 Latest deploy log https://app.netlify.com/sites/fundamental-ngx/deploys/66fe7e64591eaf00088650dc
😎 Deploy Preview https://deploy-preview-12502--fundamental-ngx.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Oct 3, 2024

Visit the preview URL for this PR (updated for commit 830debb):

https://fundamental-ngx-gh--pr12502-12441-table-settings-azujnm1u.web.app

(expires Sun, 06 Oct 2024 11:26:43 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 41b993ee8e451bd7c6770b342ce142dc886eacff

@dpavlenishvili dpavlenishvili changed the title Refactor(platform): Combine Sorting, Filtering, and Grouping Settings into a Single Dialog refactor(platform): Combine Sorting, Filtering, and Grouping Settings into a Single Dialog Oct 3, 2024
@droshev droshev changed the title refactor(platform): Combine Sorting, Filtering, and Grouping Settings into a Single Dialog fix(platform): Combine Sorting, Filtering, and Grouping Settings into a Single Dialog Oct 3, 2024
<li
fd-list-item
[interactive]="true"
class="fd-list__item_cursor-pointer"
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be fixed in fund-styles rather than adding a new class. If you want a temp fix better use dynamic style to add the cursor, something like:
[style.cursor]="interactive ? 'pointer' : 'auto'"

Copy link
Contributor

Choose a reason for hiding this comment

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

I created a fix for this in Fd styles: SAP/fundamental-styles#5678

Comment on lines +107 to +117
effect(
() => {
const filteringData = this.filteringData();
if (filteringData) {
this.filterBy.set([...filteringData.filterBy]);
this.viewSettingsFilters.set(filteringData.viewSettingsFilters);
this.columns.set(filteringData.columns);
}
},
{ allowSignalWrites: true }
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Angular strongly suggests against this approach. Have you tried achieving this with computed signals?

@droshev droshev requested a review from a team October 3, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code refactoring nice to have a nice to have feature/improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table Settings Dialog revisit
2 participants