activist-org / activist

An open-source activism platform
https://activist.org
GNU Affero General Public License v3.0
225 stars 185 forks source link

Remove Tailwind based component hiding in favor of TS breakpoint v-if conditional rendering #864

Closed andrewtavis closed 3 months ago

andrewtavis commented 5 months ago

Terms

Behavior

Original issue:

Something that's come up is that it seems that SidebarLeft and MenuMobileNavigationDropdown are running concurrently regardless of them being hidden at compliment breakpoints in the sidebar layout.

Further context:

The reason that this is happening is that just because the component is hidden via CSS doesn't mean that it's not loaded along with it's TS. What needs to happen is we need to switch the instance of hidden md:block and the like to conditional rendering based on breakpoints in breakpoints.ts. With this, these components will then not be rendered at all, and we'll get dramatic speed increases for the platform 🚀

Robot8lover commented 4 months ago

@andrewtavis Hi, is this just a matter of switching hidden md:block and md:hidden to v-if (with appropriate conditionals based on breakpoint) in the sidebar layout or is there more to it?

andrewtavis commented 4 months ago

Great to discuss another issue with you, @Robot8lover! Kind of :) We could do a first PR for just that with the hidden switching over to breakpoint based script operations, but then it'd also be good to diagnose the needs of other components to make sure that as many cases of hidden that lead to large components still being rendered can be changed over to script tags. We could potentially have this one be switching the sidebar layout as the main one and then we could further document some of the needed changes that would then be made into other issues?

Let us know how all this sounds!

andrewtavis commented 3 months ago

Closed by #890 🚀 Thanks again for all of these amazing changes, @Robot8lover! The contributions have really been amazing, and specifically you chose some extremely important things to work on. Really hope that we can work with you again in the future, and I'd be more than happy to discuss the project with you at some point on a call if you have questions :)

Thanks again, and all the best!