Skip to content

feat: Hide header toggle#155

Merged
dni merged 3 commits into
mainfrom
hide_header
Aug 13, 2025
Merged

feat: Hide header toggle#155
dni merged 3 commits into
mainfrom
hide_header

Conversation

@talvasconcelos
Copy link
Copy Markdown
Collaborator

Introduce a toggle to show/hide the header

Closes #153

@talvasconcelos talvasconcelos requested a review from dni July 30, 2025 09:25
@dni dni changed the title Hide header toggle feat: Hide header toggle Aug 5, 2025
Comment thread static/js/tpos.js
delete this.heldCarts[cartId]
}
})
this.headerElement = document.querySelector('.q-header')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

couldnt .q-header be used multiple times on the page?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's not on tpos, and also, i think, used inside q-layout

Comment thread static/js/tpos.js Outdated
Comment thread static/js/tpos.js
})
this.headerElement = document.querySelector('.q-header')
if (this.headerElement) {
this.headerElement.style.display =
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

there really should be a variable in the vue component to not render/hide this element.

setting styles on elements like that is hacky.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The q-header is extended from the base.html, no way to set it in the tpos side.

Comment thread static/js/tpos.js
},
headerToggle() {
if (this.headerElement) {
this.headerElement.style.display =
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

don't add inline styles like that, either not render the element, or add/remove classes

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

q-header is extended from base.html -> public.html in tpos.html, no way to really hide/show on tpos

Co-authored-by: dni ⚡ <office@dnilabs.com>
@dni dni merged commit 011a284 into main Aug 13, 2025
14 checks passed
@dni dni deleted the hide_header branch August 13, 2025 06:47
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.

[Improvement] remove header on TPOS

3 participants