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

keep the "pinned" attribute of the side web panel and the button in sync #5467

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

mokazemi
Copy link

@mokazemi mokazemi commented Feb 17, 2025

I just added pinned="true" attribute to web panel pin icon, so that its initial state matches with the panel state.
Also added a function to keep the pinned state of the side web panel and the button in sync.

fixes: #4322

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 17, 2025
@mauro-balades
Copy link
Member

mauro-balades commented Feb 17, 2025

What if the initial state isn't pinned? I feel like this is a cheap solution to a bigger underlying problem. Where the check isnt being ran on initialization

@mokazemi
Copy link
Author

What if the initial state isn't pinned? I feel like this is a cheap solution to a bigger underlying problem. Where the check isnt being ran on initialization

Oh, you're right. I should work more on it to see if I can do anything about it. I'm not much a JS developer but I guess I know where the issue is comming from. Maybe defining an init function that syncs the state of the panel with the icon state would solves the issue.

@mokazemi mokazemi marked this pull request as draft February 17, 2025 11:25
…nned state of the panel and the button in sync
@mokazemi mokazemi changed the title add pinned="true" attribute to web panel pin icon keep the "pinned" attribute of the side web panel and the button in sync Feb 17, 2025
@mokazemi mokazemi marked this pull request as ready for review February 17, 2025 12:31
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Feb 17, 2025
@mokazemi
Copy link
Author

I changed it to change the pin icon based on if the panel is pinned or no. @mauro-balades
I checked all three states (initial run, when the panel is unpinned last time, when the panel is pinned last time). It seems to work in all these conditions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants