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

[#547] Define "results" for the "Up" navigation to deliver result to previous screens #530

Merged
merged 5 commits into from
Dec 6, 2023

Conversation

luongvo
Copy link
Member

@luongvo luongvo commented Oct 6, 2023

Closes #547

What happened 👀

  • Define "results" for the "Up" navigation to deliver results to previous screens.
  • Add a sample to show the Updated! message on Home screen after clicking on the Update button on the Second screen.

Insight 📝

  • To navigate back to the previous screen with a result, call this for example:

     navigator(BaseDestination.Up().addResult(KeyResultOk, true))
    

Proof Of Work 📹

Screen_recording_20231031_182428.mp4

@luongvo luongvo self-assigned this Oct 6, 2023
@luongvo luongvo temporarily deployed to template-compose October 6, 2023 03:50 — with GitHub Actions Inactive
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

6 Warnings
⚠️ Uh oh! AppNavGraph.kt is under 95% coverage!
⚠️ Uh oh! BaseDestination.kt is under 95% coverage!
⚠️ Uh oh! HomeScreen.kt is under 95% coverage!
⚠️ Uh oh! MainNavGraph.kt is under 95% coverage!
⚠️ Uh oh! SavedStateHandleExt.kt is under 95% coverage!
⚠️ Uh oh! Your project is under 80% coverage!

Kover report for template-compose:

🧛 Template - Compose Unit Tests Code Coverage: 61.77%

Coverage of Modified Files:

File Coverage
AppNavGraph.kt 47.17%
BaseDestination.kt 35.59%
HomeScreen.kt 63.66%
MainActivity.kt 100.00%
MainNavGraph.kt 58.70%
SavedStateHandleExt.kt 0.00%

Modified Files Not Found In Coverage Report:

SecondScreen.kt
strings.xml

Codebase cunningly covered by count Shroud 🧛

Generated by 🚫 Danger

@luongvo luongvo force-pushed the chore/improve-the-base-navigation branch 3 times, most recently from 790795a to ad26c24 Compare October 31, 2023 11:13
@luongvo luongvo changed the title [POC] Define "results" for the "Up" navigation to deliver result to previous screens [#547] Define "results" for the "Up" navigation to deliver result to previous screens Oct 31, 2023
@luongvo luongvo force-pushed the feature/define-results-for-up-navigation branch from 3321949 to 1ab3983 Compare October 31, 2023 11:20
@luongvo luongvo added this to the 3.26.0 milestone Oct 31, 2023
@luongvo luongvo force-pushed the feature/define-results-for-up-navigation branch from 1ab3983 to a0c70a8 Compare October 31, 2023 11:25
@luongvo luongvo marked this pull request as ready for review October 31, 2023 11:25
@luongvo luongvo temporarily deployed to template-compose October 31, 2023 11:25 — with GitHub Actions Inactive
Copy link
Contributor

@kaungkhantsoe kaungkhantsoe left a comment

Choose a reason for hiding this comment

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

LGTM

@luongvo luongvo temporarily deployed to template-compose November 22, 2023 01:43 — with GitHub Actions Inactive
@luongvo luongvo requested a review from lydiasama November 22, 2023 01:44
@luongvo luongvo temporarily deployed to template-compose November 27, 2023 03:41 — with GitHub Actions Inactive
Base automatically changed from chore/improve-the-base-navigation to develop December 6, 2023 09:55
@ryan-conway ryan-conway merged commit 8992752 into develop Dec 6, 2023
3 checks passed
@ryan-conway ryan-conway deleted the feature/define-results-for-up-navigation branch December 6, 2023 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define "results" for the "Up" navigation to deliver result to previous screens
5 participants