IEEE-NITK / corpus

A Django-based web application for managing all things IEEE NITK!
https://ieee.nitk.ac.in
2 stars 4 forks source link

[UI] Add select2 to make select searchable #157

Closed anirudhprabhakaran3 closed 1 week ago

anirudhprabhakaran3 commented 3 weeks ago

Description

Make select fields searchable. This will be most useful in the case where we have a lot of options to choose from (e.g. selecting exec members)

Dependencies

Type of Change

How Has This Been Tested?

Visual testing!


Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

render[bot] commented 3 weeks ago

Your Render PR Server URL is https://corpus-dev-pr-157.onrender.com.

Follow its progress at https://dashboard.render.com/web/srv-cpk7tov79t8c73aotqig.

nishant-nayak commented 3 weeks ago

It looks like we have a grand total of 0 select fields across Corpus today. Do you know of any select fields that I can test this with? If not, I think we should hold onto this PR until we actually need the functionality.

It'll be more annoying if we merge this now and later on want to revert, we'll have to hunt for this PR and make a reverting fix.

anirudhprabhakaran3 commented 3 weeks ago

Yeah so, one place we can use this right now is in Virtual Expo, where reviewers are assigned. Currently on prod, it looks like this:

image

Its nearly impossible to select in this scenario.

Also for the groups dashboard, I am planning to make a UI where you can add members to a group, so that will also need this sort of a selection thing.

Although I agree that maybe this sort of a global change is not required - we just add that snippet in the places that we need it and no where else.

nishant-nayak commented 2 weeks ago

Thanks for the example. I just wanted to see how it looked with the current theming. Looks good to me!

This would be ~38kB of extra data being fetched on every page. While it might not be much, lets try to keep unnecessary fetches to a minimum?

Let's just keep these changes only in the files that need them, in the corresponding Django blocks (style/script)

anirudhprabhakaran3 commented 2 weeks ago

yup, sounds good