Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriisurzhykov authored May 29, 2024
1 parent e42f91a commit 04ea84a
Showing 1 changed file with 2 additions and 41 deletions.
43 changes: 2 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ the `end_local_date` is 24:00. The "Open 24 hours" has to be displayed.
"end_local_time": "00:00:00"
}
```
Or no schema for the day, so that list of time slots is empty.

</details>

Expand All @@ -212,14 +213,7 @@ better to use an image as an asset croped for different screen sizes.

### Location selection

In the example JSON structure the only one location is available, but to make things more flexible
and scalable it would be better if we would open selection screen in case of multiple location
available. So the logic should be the following:

- If there is only one location in the structure, then a screen with details by working hours
immediately opens.
- If there is multiple locations the selection screen should be displayed.
- If no location received the dialog should appear to notify user about the failure
In the example JSON structure the only one location is available and the structure of JSON at the moment does not imply that more than one location will be sent, which means at the moment, we can limit ourselve to only one location at a time. In the future if need more than one location be available for user, the location details screen remains unchanged with only few changes: the use case to fetch location details needs to be modified and the location ID has to be passed to the use case.

### Location screen

Expand All @@ -244,39 +238,6 @@ Components:
right under the first time occurence.
- It's better to animate dropdown effect to make the UI smooth

## User flow

1. App Launch:
The app starts, and the user sees a loading screen or the main screen.
2. Location Selection Screen:
After loading, the user is presented with a screen to select a location from a list of available
locations.
3. Location Selection:
The user selects a location from the list.
Upon selection, the app navigates to the detailed working hours screen for the chosen location.
4. Working Hours Screen:
On this screen, the user sees the location name and its working hours.
The user can navigate back to the location selection screen to choose another location.

### Visualization of User Flow

<img src="https://github.com/yuriisurzhykov/Purs-Android/assets/44873047/0359dacb-0c88-4239-b2d3-f2b75f3355ed" alt="drawing" width="350"/>

### Location selection screen

#### UI Elements

- Navigation Bar/App Bar with the title "Select Location".
- List of locations (List in SwiftUI, LazyColumn in Jetpack Compose).
- Loading indicator (ProgressView in SwiftUI, CircularProgressIndicator in Jetpack Compose) while
data is being loaded.
- Each list item should be styled as a card (CardView) with the location name and an arrow
indicating navigation to the detail screen.

#### Actions

When a list item is tapped, the app navigates to the detailed working hours screen for the selected
location.
</details>

<details>
Expand Down

0 comments on commit 04ea84a

Please sign in to comment.