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

feat: add column config local storage support to table #2417

Merged
merged 8 commits into from
Sep 21, 2023

Conversation

arjunlalb
Copy link
Contributor

Remove column config local storage support from table widget renderer.
Adapt and add it to table component directly.

@arjunlalb arjunlalb requested a review from a team as a code owner September 20, 2023 21:45
@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #2417 (4437af9) into main (24f49c6) will increase coverage by 0.14%.
The diff coverage is 97.67%.

@@            Coverage Diff             @@
##             main    #2417      +/-   ##
==========================================
+ Coverage   82.82%   82.96%   +0.14%     
==========================================
  Files         921      921              
  Lines       20549    20557       +8     
  Branches     3241     3245       +4     
==========================================
+ Hits        17020    17056      +36     
+ Misses       3404     3379      -25     
+ Partials      125      122       -3     
Files Changed Coverage Δ
...ojects/common/src/preference/preference.service.ts 95.23% <83.33%> (-1.26%) ⬇️
projects/components/src/table/table.component.ts 80.69% <100.00%> (+4.72%) ⬆️
...d/widgets/table/table-widget-renderer.component.ts 41.58% <100.00%> (-0.79%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Contributor

@itssharmasandeep itssharmasandeep left a comment

Choose a reason for hiding this comment

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

I haven't looked at the full code yet but I have some doubts.

  1. Will we have a way to not set preferences?
  2. Will the preference setting be a default behavior?

The problem that I see here is with the column resizing. We set pixel widths after resizing and if we save everything to the preferences then we will never have a way to revert to the original state in terms of the column sizing. and it will create a problem if someone goes from one screen to another.
Should we have a way to reset that as well? I really think we should.
We can add an action in the table menu to reset columns the columns.

jake-bassett
jake-bassett previously approved these changes Sep 21, 2023
Copy link
Contributor

@jake-bassett jake-bassett left a comment

Choose a reason for hiding this comment

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

Code looks good; no red flags here that I could see. However, table is a beast, so please be sure to test with all forms - flat, expandable, and tree versions. In particular, tree/waterfall. Also explorer table, despite being expandable, works a little different and can be thought of as a fourth version worth testing.

Approved, but please work with @itssharmasandeep on the column resizing concerns he has above as he recently improved that logic and knows it best.

@arjunlalb
Copy link
Contributor Author

I haven't looked at the full code yet but I have some doubts.

  1. Will we have a way to not set preferences?
  2. Will the preference setting be a default behavior?

The problem that I see here is with the column resizing. We set pixel widths after resizing and if we save everything to the preferences then we will never have a way to revert to the original state in terms of the column sizing. and it will create a problem if someone goes from one screen to another. Should we have a way to reset that as well? I really think we should. We can add an action in the table menu to reset columns the columns.

We are currently saving only two attributes from the column for user preferences. id and the boolean flag visible. Other column properties will continue to work as intended.

@arjunlalb
Copy link
Contributor Author

Code looks good; no red flags here that I could see. However, table is a beast, so please be sure to test with all forms - flat, expandable, and tree versions. In particular, tree/waterfall. Also explorer table, despite being expandable, works a little different and can be thought of as a fourth version worth testing.

Approved, but please work with @itssharmasandeep on the column resizing concerns he has above as he recently improved that logic and knows it best.

I've tested all the variants you mentioned. LGTM.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@arjunlalb arjunlalb merged commit df5b00c into main Sep 21, 2023
14 checks passed
@arjunlalb arjunlalb deleted the add-column-config-preferences-table branch September 21, 2023 22:13
@github-actions
Copy link

Unit Test Results

       4 files  ±0     310 suites  ±0   54m 18s ⏱️ + 6m 24s
1 126 tests +3  1 126 ✔️ +3  0 💤 ±0  0 ❌ ±0 
1 136 runs  +3  1 136 ✔️ +3  0 💤 ±0  0 ❌ ±0 

Results for commit df5b00c. ± Comparison against base commit 24f49c6.

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.

3 participants