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

Add ProductArea service #316

Merged
merged 3 commits into from
Sep 1, 2023
Merged

Add ProductArea service #316

merged 3 commits into from
Sep 1, 2023

Conversation

jeffdaley
Copy link
Contributor

Adds a ProductArea service to fetch and store product areas.

Currently these functions live in the ProductSelect component, so there's no caching, and state is reset on every render. This means we're fetching and loading more than we should. With a service, we can fetch the list once and it'll persist the session.

I'll soon use this service to add productArea to the /new model, which should improve that route's UX.

Observe the problem on main

  • Create a RFC and watch for the ProductArea dropdown's loading state. (You can refresh if you miss it.)
  • Click the back button
  • Click the RFC tile again
  • Notice the ProductArea dropdown's unnecessary loading state

@jeffdaley jeffdaley requested a review from a team as a code owner August 31, 2023 14:34
Copy link
Contributor

@jfreda jfreda left a comment

Choose a reason for hiding this comment

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

Nice - we discussed offline about perhaps exploring using Ember Data instead of a service per endpoint like this, but this seems like a good improvement to the current implementation 👍

@jeffdaley jeffdaley merged commit 4e4a9b0 into main Sep 1, 2023
2 checks passed
@jeffdaley jeffdaley deleted the jeffdaley/product-area-service branch September 1, 2023 20:22
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.

None yet

2 participants