readthedocs / ext-theme

Read the Docs drop in replacement site templates
2 stars 2 forks source link

Make organization navigation item conditional #332

Open agjohnson opened 6 months ago

agjohnson commented 6 months ago

Moved from

I made an attempt at this and had success, but the additional logic slowed down all views considerably. I used the organizations template filters to try to get a list of user organizations. This might need some more thought, and perhaps we do this in the UX side of things instead of using display time logic -- using the organization selection workflow or something?

This is working for now though, it's just very explicit for most users that only need one organization.


agjohnson commented 3 months ago

Brought up today, but perhaps this could be fixed using JS instead. The button would not do any checks in the template but would instead wait until the user clicked on the button to fetch a list of organizations and either go to the first organization or show the listing view if there are zero or multiple organizations.

I think this is a good way around this UI element and it improves the UX. Immediately, I was going to use this addition to get past the slow organization queryset noted here:

However, in testing, this queryset is still used for detail views and the pages are not any quicker to load. I'll still bump this up a little bit on our roadmap, because I think it would be a nicer UX.