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

Welcome Guide: Should be possible to link to a page via URL #8051

Closed
folletto opened this issue Jul 19, 2018 · 7 comments
Closed

Welcome Guide: Should be possible to link to a page via URL #8051

folletto opened this issue Jul 19, 2018 · 7 comments
Labels
[Feature] NUX Anything that impacts the new user experience [Type] Enhancement A suggestion for improvement.

Comments

@folletto
Copy link
Contributor

folletto commented Jul 19, 2018

screen shot 2018-07-19 at 14 46 35

The idea of Tips is that they should provide a framework to allow creating dialog-based guidance for feature, regardless of being as short as one message, or as long as a multi-step wizard.

However, I've done some research and there seem to be no URL-based way to trigger the tips, as I had to clear by local application data to make them toggle again.

Suggestion:

  • introduce a framework-level trigger via URL, for example ?tip=editor-first-time that triggers the specific flow as needed.

Why?

  1. URLs provide a way for support to guide the user easily in new features
  2. Existing help and documentation could link directly tips tutorials in order to provide guidance
  3. Specific tutorials can be re-run as needed

This will open a massively beneficial new way to provide help across WordPress.

@designsimply designsimply added [Type] Enhancement A suggestion for improvement. [Feature] NUX Anything that impacts the new user experience labels Jul 19, 2018
@nerrad nerrad added [Package] NUX [Feature] NUX Anything that impacts the new user experience and removed [Feature] NUX Anything that impacts the new user experience labels May 27, 2019
@draganescu
Copy link
Contributor

@noisysocks is NUX still something we want to update with features?

@noisysocks
Copy link
Member

No, @wordpress/nux is deprecated in favour of Guide in @wordpress/components.

@noisysocks
Copy link
Member

Although, re-reading this, I can see that it might be a useful enhancement to have WelcomeGuide look at the URL when determining whether or not to display.

@folletto
Copy link
Contributor Author

Yes, this feature stands regardless of the system chosen.
It should be possible to trigger it manually with a specific URL, as it would make it possible to create support interfaces, linked activated directly from the UI or from a support page, in a stateless way.

Please reopen this for WelcomeGuide.

@noisysocks noisysocks reopened this Apr 29, 2020
@noisysocks noisysocks changed the title Tips: should be possible to trigger them via URL Welcome Guide: Should be possible to link to a page via URL Apr 29, 2020
@t-hamano
Copy link
Contributor

If I understand correctly, this issue can't be solved by doing conditional rendering based on URL parameters?

/**
 * WordPress dependencies
 */
import { Guide } from '@wordpress/components';
import { useState } from '@wordpress/element';

export default function SomeComponent() {
	const url = new URL( window.location.href );
	const isFirstTime = url.searchParams.get( 'tip' ) === 'editor-first-time';
	const [ isOpen, setIsOpen ] = useState( isFirstTime );
	return (
		isFirstTime &&
		isOpen && (
			<Guide
				finishButtonText={ 'Close' }
				onFinish={ () => setIsOpen( false ) }
				pages={ [ { content: <p>Hello World!</p> } ] }
			/>
		)
	);
}

@draganescu
Copy link
Contributor

I think the idea is to include a standard way to avoid:

const url = new URL( window.location.href );
const isFirstTime = url.searchParams.get( 'tip' ) === 'editor-first-time';

🤷🏻 I think.

@t-hamano
Copy link
Contributor

This issue has had no activity for almost a year, and there are implementation examples in the comment.

I don’t believe this is a problem that can be solved by Gutenberg, so I’m closing this issue.

@t-hamano t-hamano closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] NUX Anything that impacts the new user experience [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants