Virtual Tour: Insert label group in editor according to the design

Description

According to the design, the label group (in the authoring tool), should be placed between the title and the “library form”. This is nothing we support, since the title really is part of the library metadata.

This is what we want to achieve:

To accomplish this, we probably need to run processSemantics “manually” for the label field, and then inject it into the correct place in the DOM. : Do you think this is achievable?

Acceptance Criteria

None

Activity

Show:
Jelena Milinovic
December 8, 2020, 3:04 PM

Are you ok with suggestions above?
To make this more consistent with what we have in IV?

I guess this still has to be in a group because a requirement was to be able to specifically set the position for each label?
But the group will be moved above the title and if left blank - it will be blank - it won't use a title as a label as previously specified.

Svein-Tore Griff With
December 8, 2020, 8:01 PM
Edited

We did not have the title field when we built IV and we do now and it is what we are currently using for "labels" (you see the the title field on hover). The design would maintain backwards compatibility in addition to keeping the interface simpler (one less input field) but I didn't think about it being so hard to implement that design.

I guess moving the label fieldset to the top is easier?

The description for the label field must also be changed to "If left blank we'll try to use the title as a label".

The label position description should be "Choose where the label should appear"

Are the defaults specified anywhere?
The default value for "Display label" should be true, but for existing content it should be false. If it is false the label / title should be added as an aria-label to avoid degrading accessibility of existing content. (At least some screen readers will use the title attribute we're adding today when we don't have anything else it can use.)

Jelena Milinovic
December 9, 2020, 9:37 AM

I made textual changes and moved the label group above the title.
I also updated the defaults we had, please check them above the design:

Hanna Eide Solstad
December 11, 2020, 11:45 AM

To reviewer : Sorry, wrong issue number on the commit: this is the right commit:

Thomas Marstrander
January 6, 2021, 11:25 AM

Looks good to me

Only problem is that when running the new code for an old virtual tour I get several JS errors:
TypeError: Cannot read property 'labelPosition' of undefined
labelPosition and showLabel needs defaults in the code for old content, or an upgradescript must be added to handle these

I assume this problem was introduced in a different issue though.

Done

Assignee

Hanna Eide Solstad

Reporter

Pål Jørgensen

Labels

Funding

None

Code reviewer

Thomas Marstrander

Released

None

Time tracking

0m

Time remaining

0m

Sprint

None

Priority

Medium