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

Digital Guide structure tab #538

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Conversation

24bartixx
Copy link
Member

@24bartixx 24bartixx commented Jan 18, 2025

What's been done

  • level page
  • region page
  • region data models initialized (lifts, ramps, lodges, stairs....)
  • region data repository for all of the following pages (lifts, ramps, lodges, stairs....)

Screens

image image image image image

Implemented pages

  • level page
  • region data page
  • corridor page

level_view -> region_view -> corridor_view

Pages to be implemented (probably new tasks)

  • dressing room page (szatnia)
  • information point page (punkt informacyjny)
  • lift page (winda)
  • lodge page (portiernia - already in tasks)
  • parking page (different than in-app parking functionality)
  • ramp page (pochylnia)
  • stair page (schody)
  • stairway page (klatka schodowa)
  • toilet page (toaleta)
  • door page (drzewi - already in tasks - I assigned myself)

Android Emulator / IOS Simulator vs physical device

  • Comparison 1
image image
  • Comparison 2
image image

Do you happen to know why in IOS Simulator and Android Emulator the spacing in some places is so extended? On physical device it works properly.

@24bartixx 24bartixx force-pushed the feat/digital-guide-structure-tab branch from d9b3d4c to be1d720 Compare January 18, 2025 23:51
@24bartixx 24bartixx self-assigned this Jan 19, 2025
@24bartixx 24bartixx linked an issue Jan 19, 2025 that may be closed by this pull request
@24bartixx 24bartixx changed the title Digital Guide structure tab \ - WIP 🛠️ Digital Guide structure tab Jan 19, 2025
Copy link
Member

@tomasz-trela tomasz-trela left a comment

Choose a reason for hiding this comment

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

Looks good to me !! A lot of work with defining models here. There are a few suggestion from me. Comments refer to every place in code where you can apply it (not only marked places) .

Copy link
Member

@mikolaj-jalocha mikolaj-jalocha left a comment

Choose a reason for hiding this comment

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

Huge part of code here, but mostly coded well. I like the job you've done with creating models for everything that was needed. It will reduce scope and complexity for other tasks. Everything in terms of them looks good to me.

I left my suggestions, questions and opinions in the comments, let me know wdyt. (domain layer, typedef )
No.1 priority here is to divide large files/widgets into smaller parts in a way that they can be reused, 318 lines of code don't look nice xd

@mikolaj-jalocha mikolaj-jalocha added the enhancement New feature or request label Jan 20, 2025
@24bartixx 24bartixx marked this pull request as draft January 20, 2025 21:51
Copy link
Member

@simon-the-shark simon-the-shark left a comment

Choose a reason for hiding this comment

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

yeah, so I'm not making a full review at the moment, but what Tomek and Mikołaj noted is very valid.

definietetly this region data should be in some domain/business layer. Would consider using typedef and record instead of freezed. Those repositories need to go to proper files in the tabs folder, where they will be reused. And some other repetition as Tomek noted needs a refactor.

my only note here from me is a thing to test/consider if loading everything together will be acceptable in terms of loading time, cause it needs to hit 20 endpoints or so

For you to know in the future, if a PR is that big, it means the scope is bloated. PR is considered HEAVY when it has 600 diff lines, so when you get close to such sizes, it means the task should have been divided.

But good job :) It's nice to see you doing hard and nice work

}

bool stringToBool(String text) {
return text.toLowerCase() == "true";
Copy link
Member

Choose a reason for hiding this comment

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

don't we have stringToBool somewhere else already?

Copy link
Member Author

Choose a reason for hiding this comment

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

We do in some other models I guess but where should we define it then? It cannot be an extension.

part "region_data_repository.g.dart";

@riverpod
Future<RegionData> regionDataRepository(Ref ref, Region region) async {
Copy link
Member

Choose a reason for hiding this comment

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

so this is a question whether we want to load everything at once. If yes then this is cool, but defienietly as Mikołaj noted, this should be some type of domain/business layer, not data layer. And would consider using typedefed Records instead of full freezed model.

but loading everything at once can be heavy to do, cause we have to wait for like 20 endpoints or so. So we gotta test if this is acceptable loading time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

/feat(digital-guide): building structure section
4 participants