Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

Base Structure for Guided tour #1

Open
wants to merge 263 commits into
base: dev
Choose a base branch
from
Open

Base Structure for Guided tour #1

wants to merge 263 commits into from

Conversation

khu5h1
Copy link
Collaborator

@khu5h1 khu5h1 commented Jun 17, 2022

Summary of Changes

  • Created base structure for Guided Tour.
  • This feature is a click-through path which the user can follow to fulfill certain tasks and it will increase the convenience for the users.
  • With this feature users don't need to read the bulky documentation.

Testing Instructions

  • Apply the patch.
  • Go to System and click on Plugin under the Manage section.
  • Enable the Guided Tours plugin.
  • Click on Guided Tours under the Manage section.
  • Now, as the Plugin is enabled you can see the Take the Tour button.
  • Click on the Take the Tour button and select the Guided Tour which you want.

Guided Tour

Guided Tour 1

Actual result BEFORE applying this Pull Request

  • Guided Tour functionality was not present.

Expected result AFTER applying this Pull Request

  • Included Guided Tour functionality.

Summary

  • Created Base Structure for Guided Tour.
  • Fixed save2new button in Step Page.
  • Made saveAsCopy working in Step section.
  • Created a working single-page tour.
  • Made steps URL re-direction working.
  • Solved the URL problem of the Guided Tour feature.
  • Solved the StepID problem.
  • Optimized and removed redundant code of the script file.
  • Modularized and re-written the entire script file.
  • Made the Overlay Option permanently true for every tour.
  • Made tour work from any page the user starts it.
  • Minor changes in extensions.sql.
  • Created Relative URL for Steps and Tours.
  • Removed the https:// from the URL to make the tour work.
  • Solved URL problem for Tours Page.
  • Made Back Button Functional for Multi-Page.
  • Added String Value for Archived Tours.
  • Added Table Structure and data for Guided Tours and Steps for Postgresql.
  • Optimized Update SQL Scripts for Postgresql and MySQL.
  • Converted 2 Update SQL Scripts for Postgresql and MySQL into one.
  • Removed Label from Hidden Field.
  • Code Cleanup
  • Update String Value for Relative URL.
  • Increase the file version to 4.3 for Update SQL Scripts for Postgresql and MySQL.
  • Follow Coding Standards.
  • Resolved the PHPCS Errors from logs for getting the build tests passed.
  • Resolved the PHPCS Warnings from logs for getting the build tests passed.
  • Resolved the comments for code cleanup.
  • Used Standard Headings for the Views and removed the tours id from the title in the steps view.
  • Resolved the code review of PR Base Structure for Guided tour #1.
  • Removed Overlay Option permanently and made it permanently true for every tour.
  • Changes done in PR: SQL fixes for PR #6 #10.
  • Added the default-tours.
  • Renamed the Next button to the Start button.
  • Sync up changes with the cleanup branch.
  • Used correct Values for Created, Modified and Checked out columns in extensions.sql.
  • Updated extensions.sql file.
  • Code cleanup for default-tours branch.
  • Added form fields for interactive and click-through tours.
  • Changed default values in step.xml.
  • Merged branch cleanup with infra-guided-tour and rebased the default-tours branch from infra-guided-tour.
  • Added functionality for the next step and redirect.
  • Added string value for URL.
  • Done changes in Extensions.sql for adding type and validation field.
  • Syncup the branch with 4.3-dev.
  • Removed hidden field label and added string value for step title label.
  • Done PHPCS fixes.
  • Removed hidden field string value.
  • Code Cleanup for guidedtours.xml.
  • Added fields for the interactive tour in default-tours.
  • Got passed all the build tests.
  • Added form fields in the tour step for an interactive tour.
  • Changed value for interactive step field in extensions.sql.
  • Add a new dropdown field that would be visible after selecting Interactive tour which has two options - Button and Text Field.
  • Solved the major problem for the interactive step and made +New Button Working.
  • If the user selects the Button field then the user will be able to click the +New button in spite of clicking on the Next Button in the pop-up.
  • On selecting the Button field the Next Button won't be visible.
  • If the user selects the Text field then it will disable the Next Button until someone enters any value in the field.
  • Added EventListner Click on the target of the step for the Button field in Interactive Tour.
  • Added EventListner input on the target of the step for Form Field.
  • Done changes for default tours in extensions.sql for changing the value according to Interactive tour.
  • Code formatting.
  • Added one more field in the Interactive step for default values.
  • Added logic in javascript for incorporating changes for adding one more field in the Interactive step.
  • Made changes in default tours in extensions.sql to make it compatible with interactive tours.
  • Identified and solved the problem and made two consecutive mandatory fields Next Button enable/disable in the interactive step work.
  • Tested the changes done for all the default tours to ensure all the tours are working with interaction.
  • Did the changes in Default tours and made improvements in interactive tours.
  • Done Update SQL scripts fixes for MySQL and PostgreSQL.
  • Added in guidedtour Table : language column, note column, index state, index language.
  • Added in guidedtour-steps Table : language column, note column, index state, index language, modified column setp-no to step_no, modified column interactivetour to interactive_type.
  • Addition of an admin module in replacement to the toolbars.
  • Calls via Ajax to avoid refreshes if the module is on the same page of a tour.
  • Changed Step Name to Step.
  • Changed Interactive Tour to Interactive Step in Steps.
  • Added Step Type column in Steps.
  • Fixed PHP 8.1 depreciation error.
  • Added permissions to own tab in Tours.
  • Added permissions to own tab in Steps.
  • Admin module database changes.
  • Tours in the database have been replaced with language keys for proper translations.
  • Empty state for steps view when no step has ever been created for a tour.
  • Added getEmptyStateQuery to return the steps of a tour.
  • Added columns access, featured, and locked.
  • Replaced 'click' with select in steps.
  • Fix EOF.
  • Fix filter forms (default sort, dropdown elements ordering).
  • Component name lowercase in the manifest.
  • Cleanup component provider.
  • Converted module mod_guidedtours to services.
  • Remove loading of language files.
  • Fixed the Take a Tour button visible before logging in.
  • Added focus on targeted elements.
  • Changes to tours to render targeted elements.
  • Accessible (in some cases, targeted elements were not tab-able).
  • Tours can't show if no user is logged in.
  • Selection of tours per language, access and component authorization.
  • Fixed Step Permission.
  • Reordering of the steps according to tour_id.
  • Created Empty State for Tours.
  • Languages inherited from parent tour in steps.
  • Added access column in tours.
  • Added note section for tours and steps.
  • Core tours and their steps, in a multilingual environment, can not be saved or else language keys are overridden.
  • Formatted database queries.
  • Created functionality for tour duplication along with its steps.
  • The step count only considers the number of published steps.
  • Fixed the width of the step table.
  • Unsets the tour_id from the active filters so that the search tools open in a closed state.
  • Allowed the creation of a custom admin menu for the guided tours component.
  • Fixed Typos in order url task attribute.
  • Fixed saving to asset table.
  • Removed the step_no column.
  • Ordering in the script, done through ordering property and not id.
  • Fixes for saving tours and steps.
  • Added a Full list of buttons to remove in editor hide.
  • Fixed bleeding over popup.
  • Added empty state.

Added default Tours that need to be created, to be packaged with Joomla Basic tours required for this project.

  • Guided Tour Introduction
  • Content > Articles
  • Content > Categories
  • Menus
  • Banners
  • Tags
  • Contacts
  • News Feeds
  • Smart Search
  • Users

@khu5h1 khu5h1 changed the base branch from 4.2-dev to dev June 17, 2022 12:40
@softforge
Copy link
Collaborator

Thank you for the hard work you have put into the guided tour, I just tried to run the first tour.
I have installed your fixes patch which said it addressed the /adminstrator/administrator issue.
I then tried to test you tour and the URL went from
http://localhost/joomla/joomla-cms/administrator/index.php?option=com_cpanel&view=cpanel&dashboard=system

to

http://localhost/gsoc22_guided-tour/administrator/index.php?option=com_guidedtours&view=tours

This is happening on my localhost. It could be you have been testing on a localhost but in the root folder and I have a different structure which has been ignored.

It would be great if you could fix this so I can test further.

@khu5h1
Copy link
Collaborator Author

khu5h1 commented Jul 17, 2022

Thank you @softforge for testing the PR and for your valuable feedback. May you please test the latest #4 PR as the relative URL problem has been solved in this.

@khu5h1
Copy link
Collaborator Author

khu5h1 commented Jul 17, 2022

As per the discussion, I have merged #3 and #4 in this branch and now this PR can be tested for the feature.

@softforge
Copy link
Collaborator

Hi well done on getting it to load and go through the tour.
I did manage to go through without adding the things described and then got into a state whereby every time I clicked on the next button it said I was leaving the site and my changes would not be saved.
I was trying to break it and indeed I did which resulted in the following
An error has occurred.
500 The Tour id was not set!

It would be great to catch the errors and see if you can deal with them gracefully.

@chmst
Copy link
Contributor

chmst commented Jul 20, 2022

Playing on the latest branch I have a few small changes:
Could you please use the standard headings for your views? Compare with other components.

Only an Icon and title of the view,
grafik

no id, but let the user know that this is the step view
grafik

And for UX: It would be nice for UX to have a hint in the field URL as an example for a relative path,

@chmst
Copy link
Contributor

chmst commented Jul 20, 2022

I am on localhost
My tour:
grafik

When I start the tour from here (cklick on the take the tour drop-down, then on my workflow tour)
It goes to http://localhost/joomla-guided/localhost/joomla-guided/administrator/index.php?option=com_workflows

which results ina 404

Copy link
Contributor

@bembelimen bembelimen left a comment

Choose a reason for hiding this comment

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

Please convert everything to PSR12 standard. (https://www.php-fig.org/psr/psr-12/ you can set it up in your IDE)

khu5h1 and others added 28 commits February 16, 2023 17:49
* Help Buttons

This PR
- adds a "Learn More" button to the emptystate view for tours and steps
- adds a "Help" button to the toolbar for tours, tour, steps and step
- adds the 4 views to the Joomla help page

NOTES:
1. The pages will need to be created on the docs.joomla.org site
2. the help_tsoc script needs to be run to rebuild the help page in the joomla admin. This should be part of the release build prcoess and not needed here

* Update HtmlView.php
Can be verified by trying to duplicate a tour.

Before this PR you get an error about the missing step_no field in the database. It is correct that the field has been removed from the database and this PR just completes its removal
The wrong language key was being used for the tourss list table caption
Prevents double translation and makes sure we are translating the correct thing
* When tour_id is missing, return error

* getTourTitle test correction

* getTourTitle return type correction

* Improved database queries formatting

* Data in ordering tables
Fix URL step for guided tours

* Fixed formatting
Typo preventing proper ordering

* Ordering fixes

* Language filter should include *

* Update 4.3.0-2022-07-30.sql

extra ;

* Removed now unnecessary getTourLanguage

* Update 4.3.0-2022-07-30.sql

Extra ;

* cancel should call parent to get proper functionality

* Fixed step ordering when a tour is run

* Test on keys
Re-ordering of fields

* Re-assignment of filter.language

* Use tour title in asset table

* Added phpcs:ignore

* Cleanup
Updates the tour view to remove the card and to set the widths the same as other components
Updates the step view to set the widths the same as other components
* Option to limit the number of tours in the dropdown

* Wrong class

* Make modal links accessible

* Cleaned code
Added progress indicator

* Assign id to steps for easier handling

* Cleanup
first pass at reviewing the language strings

Summary
- removed unused strings
- follow style guide
- use global strings
This PR adds the inline help button(toggle) to the tour and step forms

this means that by default the field descriptions are not displayed and only displayed on toggle
* Removed step section

* Removed permissions tab

* Fixed endTabSet not properly set

* Removed reference to asset table

* Removed reference to rules

* Removed rules and asset_id fields

* Fixed duplication of tours

* New guided tours plugin - thank you bembelimen

* Fixed filter.access

* Improved code - thank you bembelimen

* plg_system_tour replaced with plg_system_guidedtours

* Added key

* Added asset for plg_system_guidedtours - thank you bembelimen

* Renamed css asset

* Renamed language key

* Renamed language files

* Updated script with fixes - thank you bembelimen

* Added interactive type 'form submit'

* Removed filename tag
* Replaced tour with guidedtours in plugin test

* Renamed onAjax function

* Error assigning step id

* Steps never get to complete button
Error progress indicator current step

* Added aria-label on step buttons

* attachTo unnecessary for start tour step
Fixes copy paste errors in the renamed plugin
* Plugin and assets fixes

as everything is named in the plural eg plg_system_guidedtours this pr updates the media assets to use the plural for its names

* currentUrl not currentURL
* Added label for cancel button

* Modified settings startTabSet

* REmove storage key on tabs if it exists

* Show/hide back button

* Show/hide back button

* Add the tour start step as part of steps to make it easier to manage in the javascript

* Regular redirect fix
Back button for redirect step
Index/Step id match to make it easier to understand the code
* Corrected date for update sql scripts
* Remove of StepHelper, all in GuidedtoursHelper

* Use of mappings for step types and interactive types

* Added constants for step types and interactive types

* Use of constants for step types and interactive types

* Update to Shepherdjs 11.0.1

* Better format of type arrays

* Improved language keys

* Improved language keys

* Use of component constant for step types

* Spacing

* Spacing
As joomla/joomla-cms#39726 has been merged upstream this changes the usage of

			`onchange="this.form.submit();"`
to
			`class="js-select-submit-on-change`

not to be merged until final steps
@khu5h1 khu5h1 dismissed bembelimen’s stale review February 22, 2023 16:31

Convert to PSR12 standard

bembelimen pushed a commit that referenced this pull request Aug 22, 2023
* Prevent Exception

If $parts is `null` this will throw an exception.

```count(): Argument #1 ($value) must be of type Countable|array, null given```

This can happen if the context is e.g. the default context `text` from the `Joomla\CMS\HTML\Helpers\Content::prepare()` function.

* Update fields.php
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants