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

increase viewport width from 600 to 1024px #379

Merged
merged 3 commits into from
Jun 26, 2018
Merged

Conversation

chrismohr
Copy link
Contributor

@chrismohr chrismohr commented Jun 8, 2018

This will enable us to test the interactive states of the dropdown component. Currently the
The open state is rendering as side panel rather than a callout, because the viewport we set for puppeteer is so narrow that it triggers "responsive mode".

This also allows us to better test direction hints on callouts, which were currently rendering in the center because of the viewports size.

The reference images are able to stay the same width, because I hardcoded a max-width on the style guide to match the current width.

Unfortunately, a side effect of the viewport width change is that there are some virtually undetectable changes to pixels that will require us to update about 90 of the reference images. It seems mostly related to rounded corners, shadows and Illustrations.

One image actually changed, because the direction hint is now being accepted.
config/styleguide-visual/reference/Hovercard_alignments_hover_desktop.png

Additionally, I've included a fix for #375, by adding a wait to the specific example. Fixing this, allows us to reduce slowMo from 40 to 10.

This also revealed a MenuButton bug, filed here:
#421

@chrismohr
Copy link
Contributor Author

Here's an example diff:
button_bistate_button_join_leave_desktop_diff_png

@swese44
Copy link
Contributor

swese44 commented Jun 13, 2018

looks like you had a bad merge and reverted some previous code changes

@@ -441,7 +441,7 @@
},
"app-path": {
"version": "2.2.0",
"resolved": "https://onedrive.pkgs.visualstudio.com/_packaging/odsp-npm/npm/registry/app-path/-/app-path-2.2.0.tgz",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed paths here.

@@ -2,7 +2,7 @@

Basic usage:

```js { "props": { "data-description": "basic" } }
```js { "props": { "data-description": "basic", "data-action-states": "[{\"action\":\"none\",\"wait\":\"50\"}]" } }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added wait to allow faster browser execution. (slowMo reduce from 40 to 10ms)

@@ -2,15 +2,15 @@

Basic usage:

```js { "props": { "data-description": "basic" } }
```js { "props": { "data-description": "basic", "data-action-states": "[{\"action\":\"none\",\"wait\":\"100\"}]" } }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added wait to allow faster browser execution. (slowMo reduce from 40 to 10ms)

@@ -7,6 +7,7 @@ module.exports = Object.assign({}, config, {
require: config.require.concat([path.resolve(__dirname, 'assets/disable-animations.css')]),
propsParser: () => ({}), // Faster without parsing props. They're not needed for diffs.
theme: {
maxWidth: 632,
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this key do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It constrains the width of the styleguide, so that our screenshots stay the same width.
yamui_v8_5_0

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, understood.

@chrismohr chrismohr merged commit 92c394c into master Jun 26, 2018
@chrismohr chrismohr deleted the increase_viewport_width branch June 26, 2018 22:39
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.

3 participants