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

Site tour: Use driver.js #1714

Merged
merged 13 commits into from Oct 13, 2023
Merged

Site tour: Use driver.js #1714

merged 13 commits into from Oct 13, 2023

Conversation

trymebytes
Copy link
Contributor

@trymebytes trymebytes commented Oct 4, 2023

Problem

For more flexibilities and out of the box features, we are trying out the driver.js library.

Solution

Include the driver.js library to power the site tour.

Testing Instructions

  • Checkout this branch in your local GlotPress
  • Use this sample filter
add_filter( 'gp_tour', function( ) {
	return array(
		'ui-intro' => [
			[
				'title' => 'UI Introduction Tour',
				'color' => '#3939c7',
			],
			[
				'selector' => '.strings .original',
				'html' => 'This is the original string that needs translation'
			],
			[
				'selector' => 'textarea.foreign-text',
				'html' => 'Enter translation here',
			],
			[
				'selector' => '.sidebar-tabs',
				'html' => 'See meta tabs here',
			],
			[
				'selector' => '.button.ok',
				'html' => 'Click here to save translation',
			]
		],
		
	);
} );

Screenshots or screencast

using-driverjs

@trymebytes trymebytes marked this pull request as draft October 4, 2023 22:48
Copy link
Member

@akirk akirk left a comment

Choose a reason for hiding this comment

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

Nice, I am surprised how easy it looks to swap it out!

gp-includes/assets-loader.php Outdated Show resolved Hide resolved
gp-includes/assets-loader.php Outdated Show resolved Hide resolved
@trymebytes trymebytes marked this pull request as ready for review October 6, 2023 00:15
@trymebytes trymebytes changed the title Use driver.js for site tour Site tour: Use driver.js Oct 6, 2023
@akirk
Copy link
Member

akirk commented Oct 9, 2023

It works well if I run it on the first string. But things no longer work if I start in the second one. Upon first sight it doesn't appear as if it supported a jQuery like :visible selector. Is there anything we can do about it?

Screenshot 2023-10-09 at 14 39 29

amieiro
amieiro previously requested changes Oct 9, 2023
gp-includes/assets-loader.php Outdated Show resolved Hide resolved
gp-includes/assets-loader.php Outdated Show resolved Hide resolved
@trymebytes
Copy link
Contributor Author

Converting this to a draft while I work on the patch to driver.js in a forked repository for easy referencing.

@trymebytes trymebytes marked this pull request as draft October 11, 2023 11:11
@trymebytes trymebytes marked this pull request as ready for review October 11, 2023 12:39
Copy link
Member

@akirk akirk left a comment

Choose a reason for hiding this comment

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

Works well!

@amieiro amieiro enabled auto-merge (squash) October 13, 2023 10:53
@amieiro amieiro dismissed their stale review October 13, 2023 10:54

The suggested changes were applied.

@amieiro amieiro merged commit 89de5be into develop Oct 13, 2023
6 checks passed
@amieiro amieiro deleted the add-driverjs branch October 13, 2023 10:54
@amieiro amieiro mentioned this pull request Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants