There is currently an issue with the apl preview. If the user uses ${viewport.mode} in their APL document, it always shows "hub" irrespective of what device/viewport is being used t preview the APL document.
Use the VS Code plugin to preview above document in different viewports
The mode is always "hub"
This PR fixes the above issue.
Description
The bug was that the viewport mode was not being passed as an option to web viewhost for rendering. By default if no mode is provided, when rendering web viewhost returns "hub". The major change is adding an extra parameter to the function that renders the APL doc and updating it's invocations by passing the viewport mode.
Motivation and Context
This bug doesn't exist on authoring tool and hence we need to fix it in the vs code plugin as well.
Testing
I ran npm run test. Below is the output
122 passing (4s)
10 pending
Screenshots (if appropriate)
Types of changes
[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
[x] My code follows the code style of this project
[ ] My change requires a change to the documentation
There is currently an issue with the apl preview. If the user uses
${viewport.mode}
in their APL document, it always shows "hub" irrespective of what device/viewport is being used t preview the APL document.Steps to Reproduce
This PR fixes the above issue.
Description
The bug was that the viewport mode was not being passed as an option to web viewhost for rendering. By default if no mode is provided, when rendering web viewhost returns "hub". The major change is adding an extra parameter to the function that renders the APL doc and updating it's invocations by passing the viewport mode.
Motivation and Context
This bug doesn't exist on authoring tool and hence we need to fix it in the vs code plugin as well.
Testing
I ran
npm run test
. Below is the outputScreenshots (if appropriate)
Types of changes
Checklist
License