Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Container query addition #31

Merged
merged 20 commits into from
May 16, 2019
Merged

Conversation

Blackbaud-TrevorBurch
Copy link
Member

No description provided.

@Blackbaud-AlexKingman
Copy link
Contributor

FYI - when the flyout goes into "full screen mode" the mixins need to be updated as well.

…to media-container-addition and updated dependencies
@codecov
Copy link

codecov bot commented May 6, 2019

Codecov Report

Merging #31 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
+ Coverage   99.71%   99.76%   +0.05%     
==========================================
  Files          10       11       +1     
  Lines         348      429      +81     
  Branches       49       67      +18     
==========================================
+ Hits          347      428      +81     
  Misses          1        1
Impacted Files Coverage Δ
src/app/public/modules/flyout/flyout.service.ts 100% <100%> (ø) ⬆️
...pp/public/modules/flyout/flyout-adapter.service.ts 100% <100%> (ø) ⬆️
...public/modules/flyout/flyout-iterator.component.ts 100% <100%> (ø) ⬆️
...ublic/modules/flyout/flyout-media-query.service.ts 100% <100%> (ø)
src/app/public/modules/flyout/flyout.component.ts 99.46% <100%> (+0.05%) ⬆️
src/app/public/modules/flyout/flyout-instance.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a765b6e...f2c4d77. Read the comment docs.

Copy link
Contributor

@Blackbaud-AlexKingman Blackbaud-AlexKingman left a comment

Choose a reason for hiding this comment

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

Couple questions.

Copy link
Contributor

@Blackbaud-AlexKingman Blackbaud-AlexKingman left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@Blackbaud-SteveBrush Blackbaud-SteveBrush left a comment

Choose a reason for hiding this comment

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

Some initial thoughts. Great work on this!

I think this feature merits a visual test; ideally, some colorful columns (like you did for @skyux/theme) to demonstrate that a child component within the flyout is honoring the "new" SkyMediaBreakpoints values, instead of the actual screen size.

this.renderer.removeClass(flexEl, 'sky-responsive-container-md');
this.renderer.removeClass(flexEl, 'sky-responsive-container-lg');

if (breakpoint === SkyMediaBreakpoints.xs) {

Choose a reason for hiding this comment

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

Mind making this a switch statement for readability?

Choose a reason for hiding this comment

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

Another improvement: set the desired CSS class name to a variable, and only call this.renderer.addClass() once, at the end of the switch statement.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

src/app/public/modules/flyout/flyout-adapter.service.ts Outdated Show resolved Hide resolved
src/app/public/modules/flyout/flyout-adapter.service.ts Outdated Show resolved Hide resolved
@@ -164,6 +177,16 @@ export class SkyFlyoutComponent implements OnDestroy, OnInit {
event.stopPropagation();
}

@HostListener('window:resize', ['$event'])
public onWindowResize(event: any): void {
const xsBreakpointMaxPixels = 767;

Choose a reason for hiding this comment

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

Pulling the 767 value out of the SkyFlyoutMediaQueryService seems redundant (and potentially problematic since we'd be managing the same value in two places). Any way to keep this value buried in the service?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is an interesting one. I guess we would a method to the media query service that takes in both the window size and the flyout width and then that can do this logic inside of that. Just seemed odd to me to do that but I also understand the magic number concern.

Copy link
Member

@Blackbaud-SteveBrush Blackbaud-SteveBrush May 10, 2019

Choose a reason for hiding this comment

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

You could create a new method that checks that a given width falls within a specific breakpoint and keep the same if/else structure you have here.

(This new method could even potentially be used by the setBreakpoint method.)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good call. I've done that but just made four methods - one for each breakpoint.

I can combine them all if you like them combined during review.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@Blackbaud-TrevorBurch Blackbaud-TrevorBurch merged commit 29417f8 into master May 16, 2019
@Blackbaud-TrevorBurch Blackbaud-TrevorBurch deleted the media-container-addition branch May 16, 2019 16:08
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