-
-
Notifications
You must be signed in to change notification settings - Fork 192
add sidebar + sort modules #2225
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
Conversation
About 1: About last: |
When you make the window width narrower, the width of the sidebar changes(with a transition). I like the navbar idea, just wanted to point out the sidebar width changing when you change the width of the window(even by a small amount). |
support for small devices polish
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
transition-property: all;
transition-duration: 2s;
transition-timing-function: bezier;
transition-delay: 0.1s;
I think you should get rid of the transition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
div.header > div {
/* border: {{ theme_headerborder }}; */
border-collapse: collapse;
background-color: {{ theme_headerbgcolor }};
background-image: linear-gradient(to bottom, {{ theme_headerbgcolor}}, {{ theme_bgcolor }});
}
.dark-theme div.header > div {
background-color: {{ theme_dark_headerbgcolor }};
border: {{ theme_dark_headerborder }};
background-image: linear-gradient(to bottom, {{ theme_dark_headerbgcolor }}, {{ theme_dark_bgcolor }});
}
div.header .logo {
background-color: {{ theme_logobgcolor }};
background-image: linear-gradient(to bottom, {{ theme_logobgcolor }}, {{ theme_headerbgcolor }});
padding: 0.3em;
/* border-right: 3px solid black; */
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.dark-theme div.header .logo {
background-color: {{ theme_dark_logobgcolor }};
background-image: linear-gradient(to bottom, {{ theme_dark_logobgcolor}}, {{ theme_dark_headerbgcolor }});
border: none;
}
Get rid of background-image. I don't think a gradient is needed, just using a color should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function toggleSectionVisibility(section, message){
document.getElementById(section).hidden = ! document.getElementById(section).hidden;
if (document.getElementById(section).hidden === true){ // show
items = localStorage.getItem('hidden');
if (items !== null){
if (!(items.includes(section))){
items = items + section + '|';
}
localStorage.setItem('hidden', items);
} else {
localStorage.setItem('hidden', section + '|');
}
document.getElementById(section[0]).innerHTML = document.getElementById(section[0]).innerHTML.replace('▼', '▲');
} else { // hide
items = localStorage.getItem('hidden');
if (items !== null){
if (items.includes(section)){
items = items.replace(section + '|', '');
}
localStorage.setItem('hidden', items);
}
document.getElementById(section[0]).innerHTML = document.getElementById(section[0]).innerHTML.replace('▲', '▼');
}
}
function toggleChecked(classname){
if (window.innerWidth <= 1100) {
el = document.getElementsByClassName(classname)[0];
console.log(el.id);
if (el.id !== 'clicked') {
el.id = 'clicked';
htmlElement.classList.add('clicked');
} else {
el.id = null;
htmlElement.classList.remove('clicked');
}
}
}
Do we have to save the hidden/closed tabs in localStorage? I don't think resetting hidden parts would create any inconvenience for the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function toggleSectionVisibility(section, message){
...
}
message
argument isn't used
Is it working,cuz if the body&html is not Edit:I checked the code and found that html is |
I don't know how it got there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
input[name="q"]{ | ||
:-webkit-border-radius: 20px; | ||
-moz-border-radius: 20px; | ||
border-radius: 20px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for having a go at doing this.
My three thoughts when looking it over:
- I don't like the extra scroll bar that I get on the left hand side when all the submodule sections are open at the same time. I think that a) the submodules should perhaps start closed, only expanding when you click on the category and b) all the other sections should close when you expand one of them. This is how the default read the docs theme works, you can experiment with it in the Pygame GUI docs here.
- The upwards pointing arrow icons on the drop downs are confusing, generally I think the convention is that the arrows point to the right until expanded and then point down.
- I like the idea of broad categorisations for grouping the submodules, but since they are being changed from the classic trio of 'Most useful', 'Advanced' and 'Other'. There needs to be a bit of debate over the broad categories here. For instance, I would call the one labelled 'Music' here 'Sound' because it covers sound effects as well as playing music or midi tracks. The drawing section has too much stuff in it - including some very rarely used submodules alongside frequently used ones. time does seem to belong under window, and we also have a new submodule and class on the way called 'window' and Window. I'd be tempted to seperate out font and freetype into a section called 'Text'. 'touch' should definitely be in the input section. 'BufferProxy', 'PixelArray', 'pixelcopy' and surfarray could all go in the 'Other' bucket imho. I'm sure there are other changes that could be made but those would be a decent start, and many others will have opinions.
You mean that:
replace that with an arrow pointing to the right. Ok got it.
So here:
Did I get everything right? |
Thanks for sorting out the arrows 👍
Correct. It should eliminate the double scrollbar issue and will also make things less cluttered when you first arrive.
Yep pretty much - though the 'Other' section is still there at the minute (at least on the latest version of this branch) so no need to readd it: I think the grouping of submodules is a good idea, I just expect the exact organisation of submodules to take up the most time in getting this PR merged as I expect everyone with a stake in pygame-ce will have an opinion on it 😄 |
hmmm... Yes the Now that I think about it, it should contain:
Which would leave the "events" section with only one item in it being the "event" Should it be that way? |
I am not sure whether I agree with this PR or not. On one hand I like the new sections, as they make more sense than just how useful they are (which is arbitrary anyway). And the looks of the side panel isn't bad either. On the other hand, I don't like that now you can't see all the modules at a glance, and modules are one more click away (I used the top bar a fair amount, and this makes it a bit more "effort") Anyway this is what I came up with for the sections: Sections
|
Looks like I can't resolve merge conflicts or merge with main on this PR - probably because it is from NOTMEE12's main branch. I'm going to switch it to draft due to the inability to fix it up and lack of agreement on the website changes. |
Seems like this PR has been superseded by #2924. |
I will add sidebar (maybe also make it look better).
Also I feel that sorting by
Most Usefull stuff
,Advanced stuff
, is not the best sorting, so I will sort modules by Usecase (pygame.display
will go toWindow
section, etc.)