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

Refactor route structure #219

Merged
merged 4 commits into from Oct 30, 2020
Merged

Refactor route structure #219

merged 4 commits into from Oct 30, 2020

Conversation

@turboMaCk
Copy link
Member

@turboMaCk turboMaCk commented Oct 29, 2020

The goal of this PR is to unify and simplify routing and types around search logic.

  • Using record so fields has names (more clarity and re-usability when everything isMaybe String)
  • Avoid duplications in route definitions - use composition instead
  • Put more type-safe SearchQuery type to the route type
  • simplify the function for generating url from Model (avoid possibility of bad argument order).
@turboMaCk turboMaCk changed the title Turbo mack/refactor route structure Refactor route structure Oct 30, 2020
@turboMaCk turboMaCk requested a review from garbas Oct 30, 2020
@garbas
garbas approved these changes Oct 30, 2020
Copy link
Collaborator

@garbas garbas left a comment

🥇

-- route | channel | (search) query | show | from | size | sort
| Packages (Maybe String) (Maybe String) (Maybe String) (Maybe Int) (Maybe Int) (Maybe String)
| Options (Maybe String) (Maybe String) (Maybe String) (Maybe Int) (Maybe Int) (Maybe String)
type alias SearchArgs =

This comment has been minimized.

@garbas

garbas Oct 30, 2020
Collaborator

That was thing that grew in complexity over time. I ❤️ that you simplify it.

This comment has been minimized.

@turboMaCk

turboMaCk Oct 30, 2020
Author Member

yeah I know how these things go... that's why support for refactoring is so important in system. But that's something that every nix + elm user already knows.

@garbas garbas merged commit fe04d9b into master Oct 30, 2020
1 check passed
1 check passed
@github-actions
build-and-deploy build-and-deploy
Details
@garbas garbas deleted the turboMack/refactor-route-structure branch Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants