-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add minimize button to infowindow #2030
Conversation
Added .minimizebutton-svg-container
Added minimize button
You can read about tabindex here but 0 is a good value here. Negative value means the button cannot be focused on. |
I can't reproduce, but it was probably caused by a mix of px/em/rem in padding/margin. Can you check if I managed to fix it? |
Looks better now. But I noticed something else. If you:
...you will notice that the infowindow opens in minimized mode. I don't think this should be the default behavior. |
Fix so that infowindow doesn't remain minimized after clicking the close button.
I've fixed so infowindow doesn't remained minimized after clicking close. |
Why is the icon different compared to the popup in #1949 |
The buttons were implemented differently in popup vs infowindow. In popup I could use a simple underscore as button, but infowindow needed an svg icon. As there was no minimize icon available, I chose the pinch icon. |
LGTM. But I think we should discuss the icons. It makes no sense to have different icon styles in similar elements. Not necessarily within the scope of this particular issue, but the discussion must be had. |
So, I had a look at the code and I think that parts of the code could be written in a different way, more akin to how similar stuff in Origo is written (yes, I'm aware of the fact that the Origo code isn't 100% consistent in this regard, but still...). Specifically, I'm referring to the
There's probably an even more elegant way to do it, but I guess you get the idea. NOT saying you must change this now, just stating my very own opinion in the matter. Perhaps a topic to discuss in the next meeting? |
I've now made changes to the code according to our discussion, but I'm unsure of the correct placement of the const definitions below (Lint complains). Feedback appreciated.
|
I would have declared all three at the top (same as now) with I think the |
I've been taught to never use a variable for something that can be a constant, but I'll do it like that if that's how you prefer it. |
There are two blocks of variable definitions in init(), separated by an empty line, I've put the icons in the second block. When and where should we put empty lines in the code? |
I've updated my code. |
I created a minimize button for the infowindow (like I've previously did for the popup #1949).
I'm not sure if or how the tabindex should be changed though.