Skip to content

Conversation

@martin-trajanovski
Copy link
Collaborator

@martin-trajanovski martin-trajanovski commented Mar 20, 2025

Description

Refactors the proposal dashboard component to improve data fetching and table configuration. It enhances the component's responsiveness to route parameters for pagination and search, and streamlines the table initialization process.

Motivation

There was quite much repetitive logic in the proposal-dashboard component for the table itself that could be simplified.

Changes:

  • Improves data fetching and table configuration in the proposal dashboard component.
  • Enhances responsiveness to route parameters for pagination and search.
  • Streamlines the table initialization process.
  • Updates default values for table properties in the shared table component.

Tests included

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)

Documentation

  • swagger documentation updated [required]
  • official documentation updated [nice-to-have]

official documentation info

If you have updated the official documentation, please provide PR # and URL of the pages where the updates are included

Backend version

  • Does it require a specific version of the backend
  • which version of the backend is required:

Summary by Sourcery

Refactors the proposal dashboard component to improve data fetching and table configuration. It enhances the component's responsiveness to route parameters for pagination and search, and streamlines the table initialization process.

Enhancements:

  • Improves data fetching and table configuration in the proposal dashboard component.
  • Enhances responsiveness to route parameters for pagination and search.
  • Streamlines the table initialization process.
  • Updates default values for table properties in the shared table component.

Summary by Sourcery

Refactors the proposal dashboard component to improve data fetching and table configuration. This change enhances the component's responsiveness to route parameters for pagination and search and streamlines the table initialization process by subscribing to route changes and dispatching actions accordingly.

Enhancements:

  • Improves data fetching and table configuration in the proposal dashboard component.
  • Enhances responsiveness to route parameters for pagination and search.
  • Streamlines the table initialization process.
  • Updates default values for table properties in the shared table component.

Copy link
Contributor

@bpedersen2 bpedersen2 left a comment

Choose a reason for hiding this comment

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

Except for one minor remark this looks good.

@martin-trajanovski martin-trajanovski marked this pull request as ready for review March 21, 2025 12:33
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @martin-trajanovski - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider extracting the logic inside getTablePaginationConfig and getTableSort into a shared utility function since they are very similar.
  • It looks like you're subscribing to this.route.queryParams and then immediately dispatching an action - consider using switchMap to combine these operations.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@martin-trajanovski
Copy link
Collaborator Author

Except for one minor remark this looks good.

@bpedersen2 can you check this once more if you have some time as the typo that you pointed out is fixed now?

@martin-trajanovski martin-trajanovski added Improvement DCS DAPHNE Contribution to SciCat labels Mar 27, 2025
@Junjiequan Junjiequan force-pushed the SWAP-4585-replace-instruments-table branch from 1e38d77 to 6a42cf7 Compare April 2, 2025 08:07
@martin-trajanovski martin-trajanovski removed the request for review from bpedersen2 April 4, 2025 07:45
@martin-trajanovski martin-trajanovski merged commit 9d0b06f into master Apr 4, 2025
7 checks passed
@martin-trajanovski martin-trajanovski deleted the SWAP-4585-replace-instruments-table branch April 4, 2025 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DCS DAPHNE Contribution to SciCat Improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants