Commit Graph

151 Commits

Author SHA1 Message Date
Julian Lam
aeb94c32b9 feat: j and k hotkeys in topic to navigate through it quickly 2022-09-19 14:29:03 -04:00
Julian Lam
5b9de0e521 fix: be tidier and explicitly clean up ctrl-f hotkey on topic page 2022-09-19 09:32:36 -04:00
Julian Lam
3dd3cd8297 fix: add dropup handler to thread tools menu, updated how post tools menu adds dropup handler 2022-08-26 11:48:23 -04:00
Barış Soner Uşaklı
a2d0cd162d refactor: remove console.log 2022-08-26 11:42:12 -04:00
Barış Soner Uşaklı
0a6900fc77 feat: don't show signatures again in pagination mode in same topic 2022-08-16 19:17:23 -04:00
Barış Soner Uşaklı
aba420a3f3 feat: setting to show signatures only once in topics, closes #10071 2022-08-16 18:06:16 -04:00
Barış Soner Uşaklı
d20b07cfea Webpack5 (#10311)
* feat: webpack 5 part 1

* fix: gruntfile fixes

* fix: fix taskbar warning

add app.importScript
copy public/src/modules to build folder

* refactor: remove commented old code

* feat: reenable admin

* fix: acp settings pages, fix sortable on manage categories

embedded require in html not allowed

* fix: bundle serialize/deserizeli so plugins dont break

* test: fixe util tests

* test: fix require path

* test: more test fixes

* test: require correct utils module

* test: require correct utils

* test: log stack

* test: fix db require blowing up tests

* test: move and disable bundle test

* refactor: add aliases

* test: disable testing route

* fix: move webpack modules necessary for build, into `dependencies`

* test: fix one more test

remove 500-embed.tpl

* fix: restore use of assets/nodebb.min.js, at least for now

* fix: remove unnecessary line break

* fix: point to proper ACP bundle

* test: maybe fix build test

* test: composer

* refactor: dont need dist

* refactor: more cleanup

use everything from build/public folder

* get rid of conditional import in app.js

* fix: ace

* refactor: cropper alias

* test: lint and test fixes

* lint: fix

* refactor: rename function to app.require

* refactor: go back to using app.require

* chore: use github branch

* chore: use webpack branch

* feat: webpack webinstaller

* feat: add chunkFile name with contenthash

* refactor: move hooks to top

* refactor: get rid of template500Function

* fix(deps): use webpack5 branch of 2factor plugin

* chore: tagging v2.0.0-beta.0 pre-release version 💥 :shipit: 🎉 🚀

* refactor: disable cache on templates

loadTemplate is called once by benchpress and the result is cache internally

* refactor: add server side helpers.js

* feat: deprecate /plugins shorthand route, closes #10343

* refactor: use build/public for webpack

* test: fix filename

* fix: more specific selector

* lint: ignore

* refactor: fix comments

* test: add debug for random failing test

* refactor: cleanup

remove test page, remove dupe functions in utils.common

* lint: use relative path  for now

* chore: bump prerelease version

* feat: add translateKeys

* fix: optional params

* fix: get rid of extra timeago files

* refactor: cleanup, require timeago locale earlier

remove translator.prepareDOM, it is in header.tpl html tag

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels (#10378)

* refactor: privileges system to use a Map in the backend instead of separate objects for keys and labels

- Existing hooks are preserved (to be deprecated at a later date, possibly)
- New init hooks are called on NodeBB start, and provide a one-stop shop to add new privileges, instead of having to add to four different hooks

* docs: fix typo in comment

* test: spec changes

* feat: allow app.require('bootbox'/'benchpressjs')

* refactor: require server side utils

* test: jquery ready

* change istaller to use build/public

* test: use document.addEventListener

* refactor: closes #10301

* refactor: generateTopicClass

* fix: column counts for other privileges

* fix: #10443, regression where sorted-list items did not render into the DOM in the predicted order [breaking]

* fix: typo in hook name

* refactor: introduce a generic autocomplete.init() method that can be called to add nodebb-style autocompletion but using different data sources (e.g. not user/groups/tags)

* fix: crash if `delay` not passed in (as it cannot be destructured)

* refactor: replace substr

* feat: set --panel-offset style in html element based on stored value in localStorage

* refactor: addDropupHandler() logic to be less naive

- Take into account height of the menu
- Don't apply dropUp logic if there's nothing in the dropdown
- Remove 'hidden' class (added by default in Persona for post tools) when menu items are added

closes #10423

* refactor: simplify utils.params [breaking]

Retrospective analysis of the usage of this method suggests that the options passed in are superfluous, and that only `url` is required. Using a browser built-in makes more sense to accomplish what this method sets out to do.

* feat: add support for returning full URLSearchParams for utils.params

* fix: utils.params() fallback handling

* fix: default empty obj for params()

* fix: remove \'loggedin\' and \'register\' qs parameters once they have been used, delay invocation of messages until ajaxify.end

* fix: utils.params() not allowing relative paths to be passed in

* refactor(DRY): new assertPasswordValidity utils method

* fix: incorrect error message returned on insufficient privilege on flag edit

* fix: read/update/delete access to flags API should be limited for moderators to only post flags in categories they moderate

- added failing tests and patched up middleware.assert.flags to fix

* refactor: flag api v3 tests to create new post and flags on every round

* fix: missing error:no-flag language key

* refactor: flags.canView to check flag existence, simplify middleware.assert.flag

* feat: flag deletion API endpoint, #10426

* feat: UI for flag deletion, closes #10426

* chore: update plugin versions

* chore: up emoji

* chore: update markdown

* chore: up emoji-android

* fix: regression caused by utils.params() refactor, supports arrays and pipes all values through utils.toType, adjusts tests to type check

Co-authored-by: Julian Lam <julian@nodebb.org>
2022-04-29 21:39:33 -04:00
Barış Soner Uşaklı
a115b771f0 fix: #10096, don't display preview for links if hostname doesnt match 2021-12-22 10:55:30 -05:00
Barış Soner Uşaklı
a9f81215cf fix: only render preview on topic page 2021-12-21 11:52:16 -05:00
Barış Soner Uşaklı
621c142f8e refactor: alerts 2021-12-06 16:24:09 -05:00
Barış Soner Uşaklı
cba78aee16 refactor: use alerts.error/success 2021-12-06 14:31:35 -05:00
Barış Soner Uşaklı
1980feed46 refactor: use alerts module 2021-12-06 12:45:35 -05:00
Barış Soner Uşaklı
1a9b15989b refactor: move search functions from app.js to search module
deprecate:
app.handleSearch, use search.init(options) instead
app.enableTopicSearch, use search.enableQuickSearch(options) instead
app.prepareSearch, use search.showAndFocusInput() instead
2021-11-08 21:31:49 -05:00
Barış Soner Uşaklı
41e0240010 fix: dont show previews on mobile 2021-11-05 13:20:13 -04:00
Barış Soner Uşaklı
f728abda06 fix: remove tooltip on ajaxify 2021-11-03 10:52:03 -04:00
Barış Soner Uşaklı
9fbb3b11ef perf: only load posts once 2021-11-01 18:22:39 -04:00
Barış Soner Uşaklı
5a0efd2d42 fix: don't use # for previews 2021-11-01 15:30:36 -04:00
Barış Soner Uşaklı
8c67031609 feat: show posts previews if enabled on mouse over 2021-11-01 15:09:05 -04:00
Barış Soner Uşaklı
e8c17feedb refactor: use utils.debounce 2021-10-28 12:00:51 -04:00
Barış Soner Uşaklı
50b2ebf844 fix: remove unused code 2021-10-28 09:46:21 -04:00
Julian Lam
5a328485dd Revert "fix: only show email confirmation warning toast on pages that it applies"
This reverts commit 1bd1cc74a4.
2021-10-26 14:28:42 -04:00
Barış Soner Uşaklı
64192731a0 refactor: use search api for topic search 2021-10-25 23:12:34 -04:00
gasoved
b0a24d6dd5 refactor: var to const and let (#9885)
* refactor: var to const and let

* fix: missed global bootbox usage

* refactor: align with eslint expectations
2021-10-12 10:26:18 -04:00
Julian Lam
1bd1cc74a4 fix: only show email confirmation warning toast on pages that it applies 2021-09-01 10:51:04 -04:00
Anton Grigoryev
342503e07a Feat: Client-side hooks - replace window.trigger (#9679)
* feat/clientside-hooks: replace window.trigger with hooks.fire

* feat(clientside-hooks): Move hooks require to the top

* fix: simplifying complex logical expression

* fix: client-side hook for translator - post-review fixes
2021-08-13 16:58:37 -04:00
Julian Lam
09bac6bd7e fix: convert some hooks to use hooks module
re: julianlam/nodebb-plugin-markdown#130
2021-06-28 11:33:56 -04:00
Peter Jaszkowiak
cc9d6fd08b chore: eslint max-len 2021-02-08 18:06:44 -05:00
Barış Soner Uşaklı
6669496dba Navigator (#9049)
* feat: navigator changes

* fix: remove extra code

* feat: add lang keys
2020-12-04 11:56:10 -05:00
Barış Soner Uşaklı
1d6bcbebde feat: https://github.com/NodeBB/NodeBB/issues/8147 2020-11-16 21:31:55 -05:00
Barış Soner Uşaklı
9082062e90 fix: sort setting not using correct field name 2020-10-28 16:05:40 -04:00
Julian Lam
c26f2b6599 feat(writeapi): user settings API 2020-10-22 14:07:50 -04:00
Barış Soner Uşaklı
7148be2fd1 feat: allow passing in container to threadTools 2020-09-15 16:05:45 -04:00
Barış Soner Uşaklı
19c448612d feat: remove global RELATIVE_PATH 2020-09-06 22:12:53 -04:00
Barış Soner Uşaklı
79e847d424 fix: #8558, only navigate if user is in same topic 2020-08-11 10:20:17 -04:00
Barış Soner Uşaklı
519e665939 fix: #8538, go to first unread instead of last read 2020-07-31 10:34:10 -04:00
Barış Soner Uşaklı
50703db879 fix: #8363, dont break history 2020-06-05 18:24:11 -04:00
Barış Soner Uşaklı
0c265a41d4 fix: #8363, go to hash when entering topic 2020-06-05 17:56:31 -04:00
Julian Lam
f2c725c658 fix: topic search shortcut for macs 2020-05-06 12:55:54 -04:00
Barış Soner Uşaklı
6e5de39ba0 fix: also fix updating bookmark if sorting is newest_to_oldest 2020-02-27 18:56:22 -05:00
Barış Soner Uşaklı
bd640a1107 Topic await errors (#7727)
* feat: derp await

* feat: restore user.getSettings

* feat: cleanup

* feat: make tid const

* feat: cleanup

* fix: tests

* feat: deprecate filter:controllers.topic.get

* feat: rewrite post-index logic

* feat: change calculation to match others

* fix: use .async

* feat: remove try/catch wrapper
2019-07-03 12:48:26 -04:00
Julian Lam
98c14e0e68 fix: removal of scroll anchoring code in favour of browser handling
closes #6150
2018-11-20 16:56:54 -05:00
Barış Soner Uşaklı
1ce15e69ab dont require search and moustrap on topic page until needed 2018-11-18 10:32:08 -05:00
Barış Soner Uşaklı
c02d584b53 reduce initial js payload/requests 2018-11-17 20:50:07 -05:00
Baris Usakli
c343b93a37 optimize ajaxify
- do not call $.timeago twice on topic load and for widgets
- do not use toLocaleString for each timeago string, use a single
Intl.DateTimeFormat instance instead
- do not call format for empty timeago strings, ie a post that isnt
edited doesnt have a timeago string
- do not call isTouchDevice for every element
- remove app.replaceSelfLinks, this is superceded with /me route
- store references to jquery objects in navigator instead of creating
them on every scroll
2018-11-17 14:07:56 -05:00
Julian Lam
c95ad2c46a closes nodebb/nodebb-theme-persona#339 2018-10-11 14:29:49 -04:00
Ben Lubar
00776bdd8e Bookmark optimization (#6315)
* Set the user's bookmark if their current bookmark is past the end of the topic.

* Optimize forked topic bookmark updating.

Remove support for updating bookmarks for users who sort by votes.

Don't even consider updating bookmarks for users who have not read the posts being removed.

Only compute post indices once per fork operation instead of once per user that has ever read the topic.
2018-02-08 10:50:12 -05:00
Barış Soner Uşaklı
96084340ad closes #6186 2017-12-19 16:03:05 -05:00
Barış Soner Uşaklı
548ec6baf7 closes #6144 2017-12-03 08:32:31 -05:00
Baris Usakli
9dee81b37f closes #5830 2017-07-14 17:29:31 -04:00
Barış Soner Uşaklı
bca79da8c6 closes #4197
add in-topic search support to dbsearch
prevent multiple click handlers on in-topic search widget(each click was
causing multiple scrolls)
fix index
2017-07-12 19:29:41 -04:00