We now have Tour UI
Follow up for #1920468: Write tour integration for the first page after install showing extend and other things
Problem/Motivation
As identified by reviewers we need to provide a UI so that tips can be managed.
Proposed resolution
A Tour UI module that is developed during the Polish phase and ready to be used on Day 1 with Drupal 8.0.
Remaining tasks
User interface changes
Yes. A management interface.
API changes
No API changes anticipated. Unless absolutely required.
Contrib designated sandbox Tour UI
Original sandbox link: http://drupal.org/sandbox/tim.plunkett/1698392
http://drupalcode.org/sandbox/tim.plunkett/1698392.git/shortlog/refs/hea...
branch: 1921188-tour-ui
Comment | File | Size | Author |
---|---|---|---|
#66 | 1921188-66-tour-ui.patch | 1.8 KB | clemens.tolboom |
#63 | 1921188-63-tour-ui.patch | 1.82 KB | nick_schuch |
#58 | 1921188-tour_ui-58.txt | 35.13 KB | clemens.tolboom |
#57 | 1921188-tour_ui-57.txt | 0 bytes | clemens.tolboom |
#52 | 1921188-tour-47.patch | 64.44 KB | slewazimuth |
Comments
Comment #1
andypostAs config entities is simple to add implementation for ListController as all Configurables does in core
Comment #2
tim.plunkettHere's a first pass. Updating the issue summary with remaining tasks.
Comment #2.0
tim.plunkettAdded remaining tasks.
Comment #3
tim.plunkettIncludes somes tests from me, and other changes from @nick_schuch.
Comment #4
tim.plunkettAdded a delete form and tests for it.
Comment #5
tim.plunkettFixed the "delete" button on the tour edit form, as well as the destination of the "cancel" link, and adjusted the tests to prevent random failures.
Working on a proposal for some basic tips manipulation, then I'm done.
Comment #6
tim.plunkettOkay, here's the list controller. I've used Views as a pattern.
Comment #8
Bojhan CreditAttribution: Bojhan commentedWhy does this need a management interface? A tour building UI is totally contrib land, we should just provide the right API's so it can be easily extended. I see little point to actually providing a UI for this in core, we have little idea what the requirements are for site builders/module maintainers to use this effectively, for example this patch really only allows placing tour - it does not allow creating the contents, to me that renders this pretty much useless.
This can easily live in configuration files, for just core and contrib can take a much better iterative approach at building a great UI for this (starting in clean up phase, to figure out how a feature should be used is not a good idea - and will lead to interfaces that are useless, aka Dashboard). Core should not be responsible for everything, and this is a place where contrib can do great things providing a way to make steps, contents, in different languages, roles etc.
Comment #9
tim.plunkettThis will likely not end up in core and will be in contrib, but already it has exposed some bugs in tour module. And it will help determine if the APIs are robust enough.
If once this is done, it is decided that this will live in contrib, we can leave the code fixes and write non-UI tests.
Also, you can't add or edit tips yet because we're not done. And that IS an API addition only possible from within core.
Comment #10
Bojhan CreditAttribution: Bojhan commented@tim.plunkett That sounds like a fine idea, I just wanted to make clear I dont see this as a contrib use case.
Comment #11
LeeHunter CreditAttribution: LeeHunter commentedadding docs infra tag
Comment #12
nick_schuch CreditAttribution: nick_schuch commentedThe following patch does the following:
- Allows for tip add/edit/delete functionality. (Image attached above)
- Clean up of documentation.
- Tests for tip functionality.
Where do we go from here?
- Reviews for sure.
- We need to evaluate if there is anything that we could add to the backend that would simplify the UI code base (common snippets that other could benefit from).
- If all else if good. Break it out into a contrib module.
Comment #14
nick_schuch CreditAttribution: nick_schuch commentedLooks like I needed a reroll against the current 8.x
Comment #15
nod_reroll to make it work after the info.yml change.
Currently tips get removed if they are not bound to an element id. If you add a UI and the id or data attribute is not required you need to be able to show what those guys added.
(edit) patch for tour.js is in a separate issue #1938032: Simplify tour.js so it'll get out of this patch at some point.
Comment #16
rachel_norfolkI've just tried the patch above at #15 and it did allow me to create a useful Tour. It's a REALLY great feature!
I didn't see any of the items in the admin menu (like admin/config/user-interface/tour) so had to enter them directly as links. Once I di this, I was able to add a Tour etc.
I'll have a bit of a look as to why they are missing...
Comment #17
nod_Same as #15, just left hook_menu so that links will show up in the admin page.
Comment #18
tim.plunkettThis incorporates some of the changes in #1932048: Clean up tour ConfigEntity architecture, so this will need to be rerolled at some point.
This should be removed.
This is disconcertingly close to the ConfigEntityBase method name. But this isn't ConfigEntityBase. Can we maybe pick another name?
If we're making wrappers for everything, why bother having get()? The purpose of get() was to avoid the need or usage of wrappers... We should either switch back to get() everywhere, or remove it completely.
:)
Provides
Missing @param
I can't tell because there is no @param, but what data type would $type be here?
See #1938030: Replace View's usage of drupal_container->get() with Drupal::service(), we now have Drupal::service()
Once again, what data types are these? In some cases, you could do
if (!$tip && !$tour) {
since they're defined.Two dots
This should use _form in the route, see #1934832: Provide a dedicated approach for using forms in routes
This whole function could use more inline docs
I don't think we say "we" in docs
Is this a blocker or a follow-up? We need an issue if its a follow-up.
Do this in __construct, and use _form for the route
:)
We likely need a hook_permission here :)
Can you please put a blank line between routes? It helps for readability
Comment #19
kvantomme CreditAttribution: kvantomme commentedI think there is a typo in the selection list. Currently the options are:
I guess this should be Bottom
Comment #20
kvantomme CreditAttribution: kvantomme commentedI would like to have the possibility to enter a description for a tour. We are going to have a lot of tours, and not all of them will be UI tours where you can guess what they explain from the path to which they are attached.
I'm not sure if this belongs in the UI issue, but it was the UI that exposed this.
Comment #21
kvantomme CreditAttribution: kvantomme commentedFeedback on the tip UI:
The attributes field group is kind of confusing I think. First time users will want to fill in both boxes, they would need to read the field label to understand they don't have to.
I think a select list that lets you choose the attribute type with next to it a text field for the actual attribute would be more intuitive.
Comment #22
kvantomme CreditAttribution: kvantomme commentedFor Walkthrough.it we've been using Step to name the elements a tour consists of, this is a more natural label for a broader set of use cases since it can give meaning to the order the tips are shown in. That way a tour could be used to:
Comment #23
tim.plunkettAlso, none of the JS changes in this patch seem relevant at all. Please move them to a separate issue.
Comment #24
nod_@tim, they are and I have a new issue for it #1938032: Simplify tour.js, see #15.
First: add a new tip to the views tour, do not fill "Data id" nor "Data class" and save. There are no validation errors.
Without JS changes:
- Visit a view, start the tour. There are only 10 items, the one you just added does not show up.
With JS changes:
- when the tour starts there are 11 items, the one you just added show up in a modal.
So it's either those JS changes or some kind of validation on the form. The modal thing is a joyride feature btw.
Comment #25
tim.plunkettWell, we should have validation then. And have that other bit in the other issue, thanks for that.
Comment #26
nick_schuch CreditAttribution: nick_schuch commentedI have rerolled the patch and I believe I have fixed the issues identified by tim.plunkett in #18 and kvantomme in #19.
In terms for what was discussed in #23 and #24, Ill look at updating the base tip form to validate this in some way. I like kvantomme's suggest above of a drop down that could have data-id/data-class/modal (something to that effect).
Comment #27
nick_schuch CreditAttribution: nick_schuch commentedAs identified in #21 we need a dropdown to distinguish between the data-id/data-class/modal. In #24 and #25 we also identified that we need some sort of validation. The following patch implements this. Modal just ensures the data-id and data-class are empty values. The patch also has some added code that larowlan wrote in #1926296 that determines it's a modal via not having a data-id and a data-class.
Comment #28
kvantomme CreditAttribution: kvantomme commentedAny feedback on #20 and #22?
Comment #29
nick_schuch CreditAttribution: nick_schuch commented#20 - Adding a description to the tip's is a great idea.
#22 - I believe that this should be covered in a separate issue. I believe that this would bring on a big discussion.
Comment #30
kvantomme CreditAttribution: kvantomme commentedAs a naming issue, I guess #22 is not important enough to really start a big discussion. Unless of course someone else shares my opinion and wants to help push this forward.
Comment #31
nick_schuch CreditAttribution: nick_schuch commentedI have split out the patches in the hope that we can further refine the one that will be required for tour.module.
Comment #33
nick_schuch CreditAttribution: nick_schuch commentedtour_ui.module tips needed a reroll due to language patch in another issue.
Comment #34
klonos...and now the tour_ui.form fails. Damn!
;)
Comment #35
nick_schuch CreditAttribution: nick_schuch commented#33: core-tour_ui-form-1921188-33.patch queued for re-testing.
Comment #36
nick_schuch CreditAttribution: nick_schuch commentedhaha! Looks like a Custom block test failed. Will queue up for retest.
Comment #37
tim.plunkett#33: core-tour_ui-module-1921188-33.patch queued for re-testing.
Comment #39
nick_schuch CreditAttribution: nick_schuch commentedOk, here is the latest reroll.
I need to look at the draggable table. If:
1) Create a tip.
2) Drag it and save the list.
Comment #40
jibranGreat work @nick_schuch
Please add configuration link
admin/config/user-interface/tour
to info.yml file.Comment #41
aspilicious CreditAttribution: aspilicious commentedTabs/trailing whitespace
trailing whitespace
Comment #42
JacobSanford#39: 1921188-39-tour-ui.patch queued for re-testing.
Comment #44
JacobSanfordReroll of #39 with changes mentioned in 40-41. On second thought, should the trivial whitespace changes to the 'tour' module really be included here? I can bust out into a separate issue.
Comment #45
JacobSanfordComment #46
kugta CreditAttribution: kugta commentedI'm doing manual testing on this at the Portland sprint.
Comment #48
slewazimuth CreditAttribution: slewazimuth commentedAdded ImageURL, ImageLocal, Youtube plugins to tour and tour_ui.
Comment #49
dixon_Comment #51
slewazimuth CreditAttribution: slewazimuth commentedPath correction.
Comment #52
slewazimuth CreditAttribution: slewazimuth commentedAdjusted whitespace issues
Comment #53
clemens.tolboomComment #55
nick_schuch CreditAttribution: nick_schuch commentedWe should look at providing tip plugins that contain the forms in the contrib module. Opposed to in a core patch. We could use hook_tour_tips_info_alter or an alter hook to change the plugin metadata.
Comment #56
clemens.tolboomYeah ... testbot is right ... I cannot apply any. I'll focus on the tour_ui and probably rip that code into tour_builder. Punishment will follow later :p
drush iq-apply-patch 1921188#52a --no-commit
drush iq-apply-patch 1921188 --no-commit
Comment #57
clemens.tolboomThe patches from #52 are inter diffs. FWIW I cloned the sandbox,merged with the sandbox/8.x and tried to get it rolling but failed.
- Info file needs changes
- There is no list controller for tour,form
Attached is my effort done on core HEAD.
- I managed (by patching tour) to get a list of tours. (It's a bad patch I know but not at full)
- Add, Edit, etc fails
- I have no clue why tour is not providing for List/Form/etc as it provides the Entity. It does not feel right to let Tour UI provide for it. Changing the tour schema should be accompanied by changing the form and not rely on a contrib.
Tour UI needs more operations like clone, import, export to make building tours as easy as possible. Ie allow for textual exchange by tour editors who are by definition no coders but UX experts.
I thought enable/disable was in the active config files so I uncommented those which was wrong.
Let's please move the tour_ui to contrib asap so we can work on that. That probably makes https://drupal.org/project/tour_builder obsolete but the sooner the better :)
(my 2cents)
Comment #58
clemens.tolboom(doh) $ git diff --cached > ~/Downloads/1921188-tour_ui-58.txt
Comment #59
clemens.tolboomRelated issue #2021361: tour should be in front of toolbar (z-index)
Comment #60
nick_schuch CreditAttribution: nick_schuch commentedHi clemens.tolboom,
I have added you as a maintainer to the Tour UI sandbox (https://drupal.org/sandbox/nick_schuch/1933602). We can start pushing our code up into there if you would like? I havent pushed anything to it as yet because I was primarily working out of this issue for the bot functionality.
I have not had a chance to look over the patches since #39. But from memory Tour UI was pretty close to fully functionality (slight bugs with the ordering in the tip listing). My goal was to make the patch smaller against core (even not requiring one at all).
We should schedule some time to discuss.
Comment #61
clemens.tolboomTnx @nick_schuch
I've copied over the code from the core sandbox http://drupal.org/sandbox/tim.plunkett/1698392 to the contrib to be Tour UI sandbox https://drupal.org/sandbox/nick_schuch/1933602
It still needs work and I'm not sure whether core should fix #2025065: Tour module must add list, render and form controllers for Tour UI to work or Tour UI can fix it?
Further errors are
- Tour UI: #2025081: Add + Edit has LANGUAGE_ALL does not exists
- Tour UI: #2025085: Delete has notices
Comment #62
clemens.tolboomAs Tour UI is now on it's own what should happen to
- #48 - #52: Added ImageURL, ImageLocal, Youtube plugins
@slewazimuth as Tour is now in core you probably create a separate issue for these?
Comment #63
nick_schuch CreditAttribution: nick_schuch commentedI have been working in the Tour UI sandbox. I have it roughly working (will continue to work on it tomorrow).
I have pushed commit 4fbf2af0b2a8327a5420a79d723230afa36df6fc to Tour UI. The attached patch is what is required against core to make it work (plugins with title).
Comment #64
nick_schuch CreditAttribution: nick_schuch commentedWe should add the ImageURL, ImageLocal, Youtube plugins to Tour UI or another contrib module that implements the additional tips.
Comment #65
clemens.tolboomWhy are tips translatable? The complete tour has a language. Not it's tips right?
Patch from #63 makes tour UI list it's tours :)
Set to review to see testbot result.
Comment #66
clemens.tolboomI meant as per patch
Comment #68
nick_schuch CreditAttribution: nick_schuch commented#66: 1921188-66-tour-ui.patch queued for re-testing.
Comment #69
nick_schuch CreditAttribution: nick_schuch commentedAs mentioned in #63 this patch is only to make Tour UI work against core. The bot is only testing the plugin class change.
Comment #71
clemens.tolboomMy patch from #66 is same as #63 ... sorry for that. I still think Tips should not have language or translation.
The language issue is mentioned too in #1935120-11: Unusual language use in tour module thank to @kristen_pol (irc)
Comment #72
slewazimuth CreditAttribution: slewazimuth commentedim5 using #66 and parrallel onto intermedia uses training link, though tour runs side by side. All plugins switched to your UI plugin model. Have updated local-image and added vimeo plugins. Intermedia is outside scope of tour capabilities, thus training nomenclature.
Comment #73
clemens.tolboomLatest patches (#66 == #63) gives exception
Comment #74
nick_schuch CreditAttribution: nick_schuch commentedYou will need to reinstall after applying the patch.
Comment #75
nick_schuch CreditAttribution: nick_schuch commentedI have created #2030067: Human readable titles for Tour Tip plugin types for patch #63. I have also got the tests going green. Ready for serious review.
Comment #75.0
nick_schuch CreditAttribution: nick_schuch commentedUpdated issue summary.
Comment #75.1
nick_schuch CreditAttribution: nick_schuch commentedUpdate on Tour UI progress.
Comment #76
clemens.tolboomUpdate issue summary pointing to Tour UI
Comment #77
nick_schuch CreditAttribution: nick_schuch commentedClosing now that #2030067: Human readable titles for Tour Tip plugin types is in. We should continue the Tour UI discussion in the sandbox https://drupal.org/sandbox/nick_schuch/1933602.
Comment #78
tim.plunkettWhen I saw this marked fixed, I thought the whole Tour UI had gone in. Is postponed a better status?
Comment #79
clemens.tolboomThe issue summary has a link to contrib sandbox Tour UI
Comment #79.0
clemens.tolboomAdded link to Tour UI sandbox
Comment #80
tim.plunkettSo then it's won't fix?
It's not "fixed" if it wasn't committed to core.
Comment #81
larowlanAs per #80
Comment #81.0
larowlanUpdated issue summary.