Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in left navigation #526

Merged
merged 6 commits into from
May 24, 2019

Conversation

marynaKhromova
Copy link
Contributor

Changes proposed in this pull request:

  • fix the bug
  • improve the way to hide navigation
  • add constants.js file
  • add viewport metatag to see the mobile navigation

@jesusreal jesusreal self-assigned this May 15, 2019
@hardl hardl removed the area/luigi label May 15, 2019
Copy link
Contributor

@jesusreal jesusreal left a comment

Choose a reason for hiding this comment

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

Looks good, but as discussed please provide better names for the css breakpoints, like for example desktopMinWidth for JS variable (desktop-min-width for CSS) instead of desktopBreakpoint ;)

@CLAassistant
Copy link

CLAassistant commented May 16, 2019

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@jesusreal jesusreal left a comment

Choose a reason for hiding this comment

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

Well done!

Copy link
Contributor

@jesusreal jesusreal left a comment

Choose a reason for hiding this comment

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

Please see my comments below

@@ -545,9 +547,37 @@
});
},
onResize() {
if (window.innerWidth >= CSS_BREAKPOINTS.desktopMinWidth) {
const simpleDesktopToMobile = () => {
if (this.get().responsiveNavSetting == 'simple') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please always use === instead of ==. You will be always be right using ===

this.closeLeftNav();
}

simpleDesktopToMobile();
this.get().previousBreakpoint = window.innerWidth;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use better this.set({ previousBreakpoint: window.innerWidth });. Otherwise we are doing a mutation of the component state. It is better to let Svelte do the state updates itself, by just telling Svelte what we want to update with this.set.

Copy link
Contributor

@jesusreal jesusreal left a comment

Choose a reason for hiding this comment

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

Please see my comments

@marynaKhromova marynaKhromova merged commit 374d465 into SAP:master May 24, 2019
@marynaKhromova marynaKhromova deleted the bug-in-left-navigation branch July 30, 2019 14:02
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants