Skip to content

Adjust direction of dropdowns at the bottom of the page #4

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

Merged
merged 5 commits into from
Jan 20, 2025

Conversation

polkerty
Copy link
Contributor

@polkerty polkerty commented Jan 16, 2025

A revision of #2, which I'm reopening due to some messy merge history (master contains some force-pushes including files I also touch here.) The adjustment is to pass in a Django template variable to control when we want dropdowns to open "up".

At the bottom of the page:
image

At the top of the page:
image

It would still be nice to do this via a bootstrap upgrade and have the dropdown direction determined dynamically, but I think this is still just small enough of a change that it's worth it.

@@ -37,7 +37,10 @@ div.form-group div.controls input.threadpick-input {
display: inline;
}


.dropdown-menu--up {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of creating a custom class, it seems you can use the dropup class that's built into bootstrap instead (it's already used in commitfest.html). That also makes the caret point up. Other than that I think it's good the dropdown_mode thing seems to work well to isolate this to only the bottom of the page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, that's very nice! Updated.

@@ -183,7 +183,9 @@ <h4>Annotations</h4>
</tbody>
</table>

{% with dropdown_mode="dropup" %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

After sleeping on this, I think if you make this a <div class="dropup"> you get the same effect without having to change patch_commands.inc at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ha, that works! Very clean. :)

@JelteF JelteF merged commit c361b4e into postgres:master Jan 20, 2025
JelteF pushed a commit that referenced this pull request Jan 20, 2025
The bottom dropdowns on the patch page would expand downwards, requiring
the user to scroll down to see and click any of the buttons in the dropdown.
With this change these are changed into "dropup" menus, so the expand upwards.
JelteF pushed a commit that referenced this pull request Jan 20, 2025
The bottom dropdowns on the patch page would expand downwards, requiring
the user to scroll down to see and click any of the buttons in the dropdown.
With this change these are changed into "dropup" menus, so the expand upwards.
@JelteF JelteF mentioned this pull request Jan 22, 2025
11 tasks
JelteF pushed a commit that referenced this pull request Feb 16, 2025
The bottom dropdowns on the patch page would expand downwards, requiring
the user to scroll down to see and click any of the buttons in the dropdown.
With this change these are changed into "dropup" menus, so the expand upwards.
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.

2 participants