-
-
Couldn't load subscription status.
- Fork 859
Remove jQuery & Bootstrap #4111
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
base: 2.x
Are you sure you want to change the base?
Conversation
marked jquery as deprecated removed jquery from the following components: - AbstractGlobalSearch - Dropdown - Page - Tooltip - Drawer - DiscussionListItem - DiscussionListPane - IndexPage - LogInModal - Pane - slidable - liveHumanTimes
|
Hello @YUCLing, Thank you so much for opening a Draft PR for this. Looking at your description and title, I think we originally wanted to not just drop jQuery, but also Bootstrap, see this archived issue as an example: flarum/issue-archive#179. Right now I don't exactly know if we can and should pursue that in the scope of this overhaul. But generally speaking, if you touch something that breaks all extensions, it might as well touch more. @flarum/core opinions appreciated. |
|
Like I mentioned in the discuss thread. Really appreciate the effort 🙏 The changes will very very likely still be relevant for another major version, just not at this time right for 2.0 as it's a little late, but also because it is already difficult as it is upgrading extensions for 2.0 with all the breaking changes already introduced. |
That can be done too. But I would like to focus on jQuery first, then Bootstrap. Just split them into small tasks.
It's not a big problem. This PR doesn't have to be merged now.
Nevermind, if some extensions extend/override the functions that returns jQuery, that will be a problem. |
removed jquery from components: - AutocompleteDropdown - KeyboardNavigatable
removed jquery from components: - EditUserModal - FormModal - SearchModal - TextEditor - UploadImageButton - highlight - anchorScroll - GambitsAutocomplete
removed jquery from component: ConfirmDocumentUnload fix: anchor scroll cannot accept string
removed jquery from components: - ForumApplication - AbstractPost - Search
removed jquery from components: - AvatarEditor - CommentPost - HeaderList - LogInButton - NotificationGrid - PostMeta - PostsPage - PostStream - ReplyPlaceholder - SignUpModal - WelcomeHero - ComposerState fix: wrong usage of select fix: incorrect selector syntax
removed jquery from component: AffixedSidebar
removed jquery from core
|
I'm planning to introduce a new library (https://github.com/floating-ui/floating-ui) to take care of things like Tooltip and Dropdown's positioning, what's your opinion? |
removed jquery from extensions: - embed - emoji
|
I'll put a pause to this PR, since Mithril v3 is right around (MithrilJS/mithril.js#2982). This PR is scheduled for 3.x, which is still far away. I'm gonna decide next steps after Mithril v3 is settled. It might turn to a big overhaul to frontend instead of just removing jQuery & Bootstrap. |
This is still an ongoing work and brings huge breaking changes. Quality check and feedback are required before final merge.
Completes Roadmap
Changes proposed in this pull request:
This PR removes jQuery and Bootstrap completely from Flarum, which can greatly reduce the frontend size.
Reviewers should focus on:
cssreturns computed style valueNecessity
Components using jQuery
Core
Common
components/AutocompleteDropdowncomponents/ConfirmDocumentUnloadcomponents/EditUserModalcomponents/FormModalcomponents/SearchModalcomponents/TextEditorcomponents/UploadImageButtonhelpers/highlightutils/anchorScrollutils/GambitsAutocompleteutils/KeyboardNavigatableForum
ForumApplicationcomponents/AbstractPostcomponents/AffixedSidebarcomponents/AvatarEditorcomponents/CommentPostcomponents/Composercomponents/HeaderListcomponents/LogInButtoncomponents/NotificationGridcomponents/PostMetacomponents/PostsPagecomponents/PostStreamcomponents/PostStreamScrubbercomponents/ReplyPlaceholdercomponents/Searchcomponents/SignUpModalcomponents/WelcomeHerostates/ComposerStateAdmin
components/AdminNavcomponents/CreateUserModalcomponents/UserListPageExtensions
embed
indexemoji
addComposerAutocompletefragments/AutocompleteDropdownmentions
indexaddComposerAutocompleteaddMentionedByListaddPostMentionPreviewsaddPostQuoteButtonfragments/AutocompleteDropdownfragments/PostQuoteButtonutils/selectedTextmessages
components/MessagesPagecomponents/MessageStreamnicknames
indexsubscriptions
components/SubscriptionMenususpend
components/SuspendUserModaltags
components/TagsPagecomponents/TagSelectionModaladdTagComposerAdditional Work
SearchandAutocompleteDropdownChanged behaviors
Some features are not available in vanilla JS and is not worth implementing them. They are listed below:
Confirmed