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

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).

@github-actions
Copy link
Contributor

@github-actions
Copy link
Contributor

@turboMaCk turboMaCk changed the title Turbo mack/refactor route structure Refactor route structure Oct 30, 2020
@turboMaCk turboMaCk requested a review from garbas October 30, 2020 12:54
Copy link
Member

@garbas garbas left a comment

Choose a reason for hiding this comment

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

🥇

-- 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 =
Copy link
Member

Choose a reason for hiding this comment

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

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

Copy link
Member Author

@turboMaCk turboMaCk Oct 30, 2020

Choose a reason for hiding this comment

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

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
@garbas garbas deleted the turboMack/refactor-route-structure branch October 30, 2020 18:14
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