Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 6 years ago

#5735 closed enhancement (maybelater)

Modernise JS

Reported by: djpaul's profile DJPaul Owned by: djpaul's profile DJPaul
Milestone: Priority: normal
Severity: normal Version:
Component: Core Keywords: trac-tidy-2018
Cc:

Description

BP's JS is overdue to be updated and re-written to modern standards. Most of what we have now (even inside the templates, which was copied from BP-Default) has remaining untouched for a few years. The biggest problems with the current JS that I'd like to see addressed are:

  • Code quality is inconsistent (some is OK, most is bad).
  • Which makes it unnecessarily challenging when we want to update existing JS.
  • It's spread across many files throughout core packages (i.e. the widget JS) and the template directory. There might be opportunities for consolidation to reduce the number of requests a web browser needs to make.
  • Some of this complexity is because of JS dependencies, which we can/should use a modern approach to resolve, such as Browserify (browserify.org). This will also help us better structure our JS into modules (imagine if our PHP was all in one or two files!).

After this, we'll be in a position that empowers us to be able to seriously consider using complex JS for any future UI elements, without being worried about all these legacy JS problems. I'm also hopeful this will encourage contributions to the project from JS developers, for who we don't really make it easy to contribute (yet).

Other than personally preferring Browserify over RequireJS, all the specific details of any JS rewrite are not decided, and when we start 2.2 development, that would be a good time for all BP contributors to help plan how we decide to approach this.

Change History (9)

#1 @DJPaul
10 years ago

  • Owner set to DJPaul
  • Status changed from new to assigned

#2 @DJPaul
10 years ago

As part of #3278, I am going to soft-deprecate some existing JS that we use for auto-suggestions (to an extent TBC, keep an eye on that other ticket). All I'll be doing is moving a few existing third-party JS libs that we use into the core/deprecated folder; nothing else will change. wp_register_script, which we use already, will maintain backwards compatibility for any plugin/theme authors who enqueue/require scripts correctly.

#3 @djpaul
10 years ago

In 8559:

Messages: soft-deprecate existing autocomplete CSS/JS by moving assets into deprecated folder.

Functionality hasn't been changed, the scripts have just been moved. Eventually, these will be
replaced by a newer auto-suggest JS/UI, then these will be used just for backwards compatibility
with old themes.

See #3278 and #5735.

#4 @DJPaul
9 years ago

  • Milestone changed from 2.2 to 2.3

#5 @DJPaul
9 years ago

  • Milestone changed from 2.3 to Future Release

#6 @johnjamesjacoby
9 years ago

  • Component changed from Component - Any/All to Tools - Code Improvement

#7 @DJPaul
8 years ago

  • Component changed from Tools - Code Improvement to Core

#8 @DJPaul
6 years ago

  • Keywords trac-tidy-2018 added

We're closing this ticket because it has not received any contribution or comments for at least two years. We have decided that it is better to close tickets that are good ideas, which have not gotten (or are unlikely to get) contributions, rather than keep things open indefinitely. This will help us share a more realistic roadmap for BuddyPress with you.

Everyone very much appreciates the time and effort that you spent sharing your idea with us. On behalf of the entire BuddyPress team, thank you.

If you feel strongly that this enhancement should still be added to BuddyPress, and you are able to contribute effort towards it, we encourage you to re-open the ticket, or start a discussion about it in our Slack channel. Please consider that time has proven that good ideas without contributions do not get built.

For more information, see https://bpdevel.wordpress.com/2018/01/21/our-awaiting-contributions-milestone-contains/
or find us on Slack, in the #buddypress channel: https://make.wordpress.org/chat/

#9 @DJPaul
6 years ago

  • Milestone Awaiting Contributions deleted
  • Resolution set to maybelater
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.