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

Compass App: Search form screen #2353

Merged
merged 20 commits into from
Jul 15, 2024
Merged

Conversation

miquelbeltran
Copy link
Member

@miquelbeltran miquelbeltran commented Jul 12, 2024

Part of the implementation of the Compass App for the Architecture sample.

Merge to compass-app

This PR introduces the Search Form Screen, in which users can select a region, a date range and the number of guests.

The feature is split in 5 different widgets, each one depending on the SearchFormViewModel. The architecture follows the same patterns implemented in the previous PR #2342

TODO later on:

  • Error handling is yet not implemented, we need to introduce a "logger" and a way to handle error responses.
  • All repositories return local data, next steps include creating the dart server app.
  • The search query at the moment only takes the "continent" and not the dates and number of guests, that would be implemented later on as well.

Demo

Screencast.from.2024-07-12.14-30-48.webm

Pre-launch Checklist

  • I read the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I read the Contributors Guide.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-devrel channel on Discord.

Copy link
Member Author

Choose a reason for hiding this comment

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

Although the list of continents is short and will remain the same, I think we should put it on the server-side as well, even if for teaching purposes.

(besides, image URLs may change, so it is good to have control over that)

Copy link
Member Author

Choose a reason for hiding this comment

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

Personally, I prefer to use fakes instead of mocks when possible.
In this case, it was the easiest way to mock the GoRouter implementation and test that the route is called correctly with all query parameters.

@miquelbeltran miquelbeltran marked this pull request as ready for review July 12, 2024 13:38
@miquelbeltran miquelbeltran merged commit 496b467 into compass-app Jul 15, 2024
1 check passed
@miquelbeltran miquelbeltran deleted the mb-compass-app-search branch July 15, 2024 13:40
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