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

Add goBack support for normal navigation #595

Merged
merged 22 commits into from
Jun 27, 2019

Conversation

maxmarkus
Copy link
Contributor

goBack works now also if you are navigating normally and want to go back to the last route.

  • not working when default child routing kicks in, until Improve default child mechanism  #216 is fixed
  • goBackContext is not supported when using normal navigation, works only with preserved view

@maxmarkus maxmarkus added the enhancement New feature or request label Jun 19, 2019
@maxmarkus maxmarkus added this to the Sprint_1 milestone Jun 19, 2019
@JohannesDoberer JohannesDoberer self-assigned this Jun 19, 2019
@pekura pekura self-assigned this Jun 24, 2019
Copy link
Contributor

@bszwarc bszwarc left a comment

Choose a reason for hiding this comment

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

Added three comments

@@ -136,8 +136,8 @@ export declare interface LinkManager {
fromContext: (navigationContext: string) => this;

/**
* Discards the active view and navigates back to the last visited view (preserved view), if a preserved view was set before.
* @param {any} goBackValue data that is passed in the `goBackContext` field to the last visited view
* Discards the active view and navigates back to the last visited view. Works with preserved views, as well as classical browser back substitute. `goBackContext` is only available when using preserved views.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Discards the active view and navigates back to the last visited view. Works with preserved views, as well as classical browser back substitute. `goBackContext` is only available when using preserved views.
* Discards the active view and navigates back to the last visited view. Works with preserved views, as well as the classic browser back substitute. **goBackContext** is only available when using preserved views.

@@ -206,22 +206,20 @@ export class linkManager extends LuigiClientBase {
}

/**
* Discards the active view and navigates back to the last visited view (preserved view), if a preserved view was set before.
* Discards the active view and navigates back to the last visited view. Works with preserved views, as well as classical browser back substitute. `goBackContext` is only available when using preserved views.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Discards the active view and navigates back to the last visited view. Works with preserved views, as well as classical browser back substitute. `goBackContext` is only available when using preserved views.
* Discards the active view and navigates back to the last visited view. Works with preserved views, as well as the classic browser back substitute. **goBackContext** is only available when using preserved views.

client/src/linkManager.js Outdated Show resolved Hide resolved
@@ -192,11 +192,11 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/

### goBack

Discards the active view and navigates back to the last visited view (preserved view), if a preserved view was set before.
Discards the active view and navigates back to the last visited view. Works with preserved views, as well as classical browser back substitute. `goBackContext` is only available when using preserved views.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Discards the active view and navigates back to the last visited view. Works with preserved views, as well as classical browser back substitute. `goBackContext` is only available when using preserved views.
Discards the active view and navigates back to the last visited view. Works with preserved views, as well as the classic browser back substitute. **goBackContext** is only available when using preserved views.

docs/luigi-client-api.md Outdated Show resolved Hide resolved
client/luigi-client.d.ts Outdated Show resolved Hide resolved
Co-Authored-By: Barbara Szwarc <barbara.m.szwarc@gmail.com>
@maxmarkus maxmarkus merged commit defd40a into SAP:master Jun 27, 2019
@maxmarkus maxmarkus deleted the 265-goback-internal-routes branch June 27, 2019 09:03
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
* Implemented goBack to do history.back() if no preserved view is available
* documented that goBackContext is only available when using preserved views
* added warning when using goBackContext but its not available
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
None yet
Development

Successfully merging this pull request may close these issues.

4 participants