Problem/Motivation

Recipes can provide new tours. But ideally they would be able to alter existing tours.
A config action for adding a step to existing tours will be helpful.

simpleConfigUpdate might be available, but would require updating the entire list.

Proposed resolution

Create a method addStep receiving a single step in tour config entity.

Remaining tasks

MR

User interface changes

None

API changes

API addition

Data model changes

None

Issue fork tour-3478729

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

penyaskito created an issue. See original summary.

penyaskito’s picture

Issue tags: +Starshot
penyaskito’s picture

smustgrave’s picture

This postponed on the related item?

thejimbirch’s picture

Not postponed, both are related to the Drupal CMS Dashboard track.

smustgrave’s picture

So if the one lands what would be needed here?

Super new to the config actions

penyaskito’s picture

Tour will need its own config actions implemented. I added that one as related because the implementation will probably be very similar.

thejimbirch’s picture

smustgrave’s picture

Just following up on this one, think it would be neat to add.

smustgrave’s picture

Assigned: Unassigned » smustgrave

Finally going to give this a shot, fingers crossed

smustgrave’s picture

One question though do I need a deriver or can I use entity_type: ['tour']

penyaskito’s picture

I don't think you need a deriver for this one.

smustgrave’s picture

So would it be something like

my-tip-id:
  addTipToTour:
    plugin: text
    label: Tips
    weight: 7
    position: 'auto'
    selector: '#edit-tips'
    body: '<p>These are the tips.</p>'

Does the configuration need to be nested in anything?

smustgrave’s picture

Status: Active » Needs review
penyaskito’s picture

Status: Needs review » Needs work

In #3540305: The addComponentToLayout config action should support adding multiple components we added the ability to add several blocks to a layout in the same action. I think for tour tips it's even more relevant.

smustgrave’s picture

Status: Needs work » Needs review

Something like that?

smustgrave’s picture

If no objections going to merge for a deploy today

thejimbirch’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me. Love the example in the comments of the action. Marking RTBC.

smustgrave’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

  • smustgrave committed 8955c338 on 2.0.x
    [#3478729] feat: Config Action for adding a step to existing tours
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.