Skip to content

Add Sidebar and SidebarNotificationButton components - #390

Closed
julianajlk wants to merge 11 commits into
masterfrom
julianajlk/REV-2125/valueprop-sidebar
Closed

Add Sidebar and SidebarNotificationButton components#390
julianajlk wants to merge 11 commits into
masterfrom
julianajlk/REV-2125/valueprop-sidebar

Conversation

@julianajlk

@julianajlk julianajlk commented Mar 15, 2021

Copy link
Copy Markdown
Contributor

EDIT: build is failing for unknown reasons, I made a duplicate of this PR and divided the commit that was failing at unrelated tests, and all of them passed. Duplicate PR here https://github.com/edx/frontend-app-learning/pull/414

REV-2125.

For Value Prop implementation, we will implement a sidebar that is triggered on click of a button with upgrade messaging and CTA. Pls note this ticket does not cover adding the upgrade messaging and CTA, it only covers adding the button trigger and sidebar component.

Large screen size (> 992px):
Screen Shot 2021-04-08 at 12 49 43 PM
Screen Shot 2021-04-08 at 12 49 51 PM

Responsive at medium screen sizes (> 576px and < 992px): it has the button like large and above screen size, but the sidebar behaves in full width mode like for small screens.
Screen Shot 2021-04-08 at 12 57 28 PM
Screen Shot 2021-04-08 at 12 57 37 PM

Responsive at small screen sizes (< 576px):
Screen Shot 2021-04-08 at 1 03 12 PM
Screen Shot 2021-04-08 at 1 02 26 PM

@julianajlk
julianajlk force-pushed the julianajlk/REV-2125/valueprop-sidebar branch 2 times, most recently from c443711 to f2035c7 Compare March 16, 2021 18:40
@openedx openedx deleted a comment from codecov Bot Mar 16, 2021
@codecov

This comment has been minimized.

@julianajlk
julianajlk force-pushed the julianajlk/REV-2125/valueprop-sidebar branch 2 times, most recently from 1267933 to c2dd9ef Compare March 23, 2021 02:11
@julianajlk
julianajlk force-pushed the julianajlk/REV-2125/valueprop-sidebar branch 3 times, most recently from bef83fc to af0133f Compare April 8, 2021 16:43
@julianajlk
julianajlk force-pushed the julianajlk/REV-2125/valueprop-sidebar branch from af0133f to 34aad4b Compare April 9, 2021 22:50
@julianajlk
julianajlk force-pushed the julianajlk/REV-2125/valueprop-sidebar branch from 34aad4b to bc2657a Compare April 13, 2021 13:40
Comment thread src/courseware/course/Sidebar.jsx Outdated
Comment thread src/courseware/course/messages.js Outdated
Comment thread src/courseware/course/messages.js Outdated
height: 100%;
background-color: white;
margin: 0;
border: none;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If you use border: transparent instead of border: none, the border will show up as a white box on Windows High Contrast Mode. Sometimes this is useful. I'm not sure if it would help here. It would also change your box size calculation for the width of the borders.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@wittjeff Would it be useful to have the "transparent" border if it's on a full width screen (the sidebar takes up the entire screen)?

@julianajlk
julianajlk force-pushed the julianajlk/REV-2125/valueprop-sidebar branch from bc2657a to b58d9d5 Compare April 13, 2021 19:17
Comment thread src/courseware/course/Sidebar.jsx Outdated
function Sidebar({
intl, toggleSidebar,
}) {
const shouldDisplayFullScreen = useWindowSize().width < 992;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reusable variable that can be used here (and other places where the sizes are hardcoded) so you don't have to hardcode the pixel size? Something like media-breakpoint-down(xs) in edx-platform?

@julianajlk julianajlk Apr 14, 2021

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good question, there is a way to add to a SCSS file (ie. $grid-breakpoints), but not sure about here, will take a look how to do it in JSX.

}

.mobile-close {
font-weight: 500;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you use the font-weight-bold class from https://paragon-edx.netlify.app/foundations/typography/?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because I have a separate SCSS file, I'm generally choosing not to add utility classes inline but add all CSS to the file to keep it contained. Except for responsive padding/margin, which are simpler to do than adding media queries.

@julianajlk
julianajlk force-pushed the julianajlk/REV-2125/valueprop-sidebar branch from b58d9d5 to 444b1a0 Compare April 14, 2021 16:41
@julianajlk julianajlk closed this May 6, 2021
@julianajlk
julianajlk deleted the julianajlk/REV-2125/valueprop-sidebar branch May 6, 2021 18:51
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.

4 participants