Skip to content

Commit

Permalink
feat: No additional margin when hidden app - MEED-2924-Meeds-io/MIPs#103
Browse files Browse the repository at this point in the history
 (#3195)

This change allow to add a new data attribute to check if all steps in the gattingStarted portlet are done so we add hidden class to the app parent.

(cherry picked from commit e24b613)
  • Loading branch information
SaraBoutej authored and exo-swf committed Nov 22, 2023
1 parent d9516b1 commit d0a6508
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
%>
<div class="VuetifyApp">
<div style="" id="GettingStartedPortlet">
<div style="" id="GettingStartedPortlet" data-can-close="<%=canClose%>">
<div data-app="true"
class="v-application v-application--is-ltr theme--light" id="app">
<div class="v-application--wrap">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ if (parentAppElement) {
hideGettingStarted().then(() => parentElementToHide.classList.add('hidden'));
});
};
} else {
const parentElementToHide = document.querySelector('#GettingStartedPortlet');
if (parentElementToHide) {
parentElementToHide.closest('.PORTLET-FRAGMENT').classList.add('hidden');
}
}
const parentElementToHide = document.querySelector('#GettingStartedPortlet');
if (parentElementToHide && parentElementToHide.dataset.canClose === 'true') {
parentElementToHide.closest('.PORTLET-FRAGMENT').classList.add('hidden');
}

0 comments on commit d0a6508

Please sign in to comment.