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

Improve Products index #2633

Merged
merged 9 commits into from Oct 5, 2021
Merged

Improve Products index #2633

merged 9 commits into from Oct 5, 2021

Conversation

josemigallas
Copy link
Contributor

@josemigallas josemigallas commented Oct 1, 2021

What this PR does / why we need it:

The page is visually identical but this PR introduces a series of improvements:

  • Extracts ruby logic into presenter and decorator
  • Refactors JS: typings, proper extension JSX, extracts ToolbarSearch for reusability
  • Simplifies CSS
  • Adds some tests

Part 1/2 of THREESCALE-7646: Cleanup/refactor Products and Backends index logic

Before:
Screenshot 2021-10-01 at 12 11 56

After:
Screenshot 2021-10-01 at 12 11 31

Search input:
Imagine the popover message reads: To search, type at least 3 characters.
https://user-images.githubusercontent.com/11672286/136042060-86e2937a-014a-48e1-99aa-ca504caafdac.mp4

@josemigallas josemigallas requested review from a team October 1, 2021 10:16
@josemigallas josemigallas self-assigned this Oct 1, 2021

def presenter
@presenter ||= Api::ServicesIndexPresenter.new(current_user: current_user, params: params)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this method used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's used in the view:

div#products data=presenter.data

@josemigallas josemigallas merged commit 3d9545f into master Oct 5, 2021
@josemigallas josemigallas deleted the improve_products_index branch October 5, 2021 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants