Skip to content

compile sass before inline_css - #16040

Merged
wjordan merged 2 commits into
stagingfrom
sass_fix
Jun 22, 2017
Merged

compile sass before inline_css#16040
wjordan merged 2 commits into
stagingfrom
sass_fix

Conversation

@wjordan

@wjordan wjordan commented Jun 22, 2017

Copy link
Copy Markdown
Contributor

fixes bug in #15988 causing test-flakiness.

@joshlory

Copy link
Copy Markdown
Contributor

Is this the first usage of SCSS in Pegasus? My understanding is that historically Pegasus hasn't supported SCSS, and has instead used the /shared directory to include compiled SCSS.

@wjordan wjordan mentioned this pull request Jun 22, 2017
@wjordan

wjordan commented Jun 22, 2017

Copy link
Copy Markdown
Contributor Author

The use of /shared to include compiled SCSS isn't changing at all. What #15988 did was add an extra Pegasus helper to inline contents into a Pegasus page. This adds the needed hook to kick the compilation of existing shared SCSS when its contents are referenced from this helper (to handle the edge-case when the scss is referenced from this helper before it's been compiled by the shared route, which can happen intermittently in unit tests). I wouldn't characterize this as using SCSS in Pegasus so much as referencing the existing shared SCSS in a new place.

@wjordan

wjordan commented Jun 22, 2017

Copy link
Copy Markdown
Contributor Author

The test failure appears to be eyes UI test flakiness, the unit tests all passed without issue.

@wjordan
wjordan merged commit c7f7c2a into staging Jun 22, 2017
@wjordan
wjordan deleted the sass_fix branch June 22, 2017 21:13
@joshlory

Copy link
Copy Markdown
Contributor

Is it new that Pegasus is processing SCSS?

Was this PR reviewed prior to merge?

@wjordan

wjordan commented Jun 24, 2017

Copy link
Copy Markdown
Contributor Author

Is it new that Pegasus is processing SCSS?

No, it's not new- Pegasus already processes SCSS on every request via its included SharedResources middleware (which includes Sass::Plugin::Rack). However, SharedResources isn't present in some unit tests that include the Documents routes directly. SCSS now needs to be processed in these unit tests because it's being inlined into the HTML response these Pegasus routes return.

Was this PR reviewed prior to merge?

This was a bug-fix PR (which I don't normally peer-review), which I verified both manually and in the CI build before merging. For the original inline_css PR #15988, I shared+discussed with Hema offline and confirmed a passing CI build before merging (the flaky-failure only surfaced later).

I moved quickly on this feature in order to ensure results by the end of Hema's last week with us, but I plan on returning for more cleanup/refactoring next week. Let me know if you have concerns/feedback and I'll be sure to follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants