Commit Graph

56 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
45cfb3691e feat: show unread categories based on unread topics (#12317)
* feat: show unread categories based on unread topics

if a category has unread topics in one of its children then mark category unread
deprecate cid:<cid>:read_by_uid sets
upgrade script to remove the old sets

* chore: up harmony
2024-01-30 17:47:06 -05:00
Barış Soner Uşaklı
84fed97b41 feat: add tracking categories and make watching send notifications (#12147)
* feat: add tracking categories and make watching send notifications

upgrade script to change the defaults

* add missing spec

* test: one more spec
2023-11-03 12:49:17 -04:00
Barış Soner Uşaklı
c3afe44686 Acp redesign (#11639)
* acp sidebar

* gap in nav

* remove shadow

* label fixes

* color fixes

* feat: settings page wip

* feat: scroll spy 👓

move social into general, store social in meta.config like other settings
write upgrade script

* remove social

* rermove openapi routes

* cleanup, highlight selected nav item

* more cleanup

* advanced margin top

* derp

* match design

* bring back version alert

fix homepage js, since it moved to general settings

* remove unused tpls

these moved to general settings

* remove more  css

* offcanvas for mobile

fix search

* add timeout

* add new props

* manage categories

* small fixes

* category-edit

* feat category page fixes

* add title to settings pages

add user settings page

* small fixes

* some more settings pages

* fix: plugin page titles

* more settings pages

* more padding

* more pages, add acp paginator.tpl

so it doesn't change when active theme changes

* remove placeholder

* dashboard table

* fix: openapi

* fix: controller tests

* use fonts from core

* some small fixes

* fix rep page

* refactor: fix name of upgrade script

* create category modal

group edit

* group/groups pages

* admins mods

* privs

* uploads

* missing margin

* more acp pages

* more pages

* plugins/rewards/widgets

* wrap rewards

* fix widgets

* fix widget clone button

* fix group acp edit link

* update search dropdown

* remove display block from tbody

* use less css

* remove some derp links

* remove striped tables

* remove p tags from lang files

* update email settings

* Update api.tpl

* move tag-whitelist
2023-05-31 11:54:48 -04:00
Barış Soner Uşaklı
d68352cce5 lint: remove unused 2023-01-30 12:35:08 -05:00
Barış Soner Uşaklı
0713482bd4 feat: #11240, only show relevant users in flags assignee list
for user flags-> admins + all users who have `admin:users` privilege
for post flags -> admins + global mods + moderators of the category the post is in
refactor getModeratorUids function so it can be used for different privileges
2023-01-30 12:26:08 -05:00
Julian Lam
f295174e07 test: fix broken test 2023-01-23 09:58:51 -05:00
Julian Lam
459bc52338 fix: #11136, tests, and returning the proper number of arrays 2023-01-18 15:08:35 -05:00
Julian Lam
39e009c05a fix: #11136, only show mods of active categories when getModeratorUids is called 2023-01-18 14:47:10 -05:00
Barış Soner Uşaklı
fb363957d1 refactor: tab rules 2021-11-18 16:42:18 -05:00
Barış Soner Uşaklı
0d975bc4fb fix: dont show system tags in whitelist dropdown to regular users 2021-06-22 12:21:40 -04:00
Barış Soner Uşaklı
285aa36556 feat: allow exists methods to work with arrays and single id 2021-03-31 13:20:35 -04:00
Barış Soner Uşaklı
d16b45fd2d feat: pass all data to filter:category.get 2021-03-31 11:15:50 -04:00
Peter Jaszkowiak
cc9d6fd08b chore: eslint max-len 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
b56d9e12b5 chore: eslint prefer-arrow-callback 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
707b55b6a5 chore: eslint prefer-template 2021-02-08 18:06:44 -05:00
Barış Soner Uşaklı
47299ea587 Categories refactor (#9257)
* feat: wip categories pagination

* feat: add subCategoriesPerPage setting

* feat: add load more sub categories button to category page

* fix: openapi spec

* feat: show sub categories left on category page

hide button when no more categories left

* breaking: rename categories to allCategories on /search

categories contains the search results

* fix: spec

* refactor: remove cidsPerPage

* fix: tests

* feat: use component for subcategories

* fix: prevent negative subCategoriesLeft

* feat: new category filter/search WIP

* feat: remove categories from /tag

* fix: dont load all categories when showing move modal

* feat: allow adding custom categories to list

* breaking: dont load entire category tree on post queue

removed unused code
add hooks to filter/selector
add options to filter/selector

* feat: make selector modal work again

* feat: replace old search module

* fix: topic move selector

* feat: dont load all categories on create category modal

* fix: fix more categorySelectors

* feat: dont load entire category tree on group details page

* feat: dont load all categories on home page and user settings page

* feat: add pagination to /user/:userslug/categories

* fix: update schemas

* fix: more tests

* fix: test

* feat: flags page, dont return entire category tree

* fix: flag test

* feat: categories manage page

dont load all categories
allow changing root category
clear caches properly

* fix: spec

* feat: admins&mods page

dont load all categories

* fix: spec

* fix: dont load all children when opening dropdown

* fix: on search results dont return all children

* refactor: pass all options, rename options.cids to options.selectedCids

* fix: #9266

* fix: index 0

* fix: spec

* feat: #9265, add setObjectBulk

* refactor: shoter updateOrder

* feat: selectors on categories/category

* fix: tests and search filter

* fix: category update test

* feat: pagination on acp categories page

show order in set order modal

* fix: allow drag&drop on pages > 1 in /admin/manage/categories

* fix: teasers for deep nested categories

fix sub category display on /category page

* fix: spec

* refactor: use eslint-disable-next-line

* refactor: shorter
2021-02-07 15:09:52 -05:00
Barış Soner Uşaklı
e40af441c9 fix: cache key collision 2021-02-05 16:29:56 -05:00
Barış Soner Uşaklı
34c42c6fa3 feat: ability to search categories, #8813 2021-01-27 22:51:22 -05:00
Julian Lam
6e2da9966e refactor: move plugin hook methods to plugin.hooks.* 2020-11-20 16:32:39 -05:00
Barış Soner Uşaklı
a05905f196 performance improvements (#8795)
* perf: nconf/winston/render

cache nconf.get calls
modify middleware.pageView to call next earlier
don't call winston.verbose on every hook see https://github.com/winstonjs/winston/issues/1669
translate header/footer separately and cache results for guests

* fix: copy paste fail

* refactor: style and fire hook only log in dev mode

* fix: cache key, header changes based on template

* perf: change replace

* fix: add missing await

* perf: category

* perf: lodash clone

* perf: remove escapeRegexChars
2020-10-26 10:43:18 -04:00
Barış Soner Uşaklı
437424375e feat: expose calculateTopicPostCount and getChildrenTree 2020-09-14 14:27:44 -04:00
Barış Soner Uşaklı
ce6b20c4b7 feat: remove topics.async.getTopicData usage 2020-07-24 12:02:16 -04:00
Barış Soner Uşaklı
97c086aba9 fix: missing await 2020-05-12 12:18:30 -04:00
Barış Soner Uşaklı
7e42988489 refactor: shorter function 2020-05-08 20:27:04 -04:00
Baris Usakli
485fbd2f14 feat: #7964, change all categories at once
allow passing cids to setCategoryWatchState and category.exists
2019-10-11 15:25:41 -04:00
Baris Usakli
ac6eb31c69 refactor: async/await flags.js 2019-09-28 14:37:50 -04:00
Barış Soner Uşaklı
310c6fd33f properly filter /unread /recent /popular /top (#7927)
* feat: add failing test for pagination

* feat: test

* fix: redis tests

* refactor: remove logs

* fix: add new test

* feat: make sortedSetRangeByScore work with keys on redis

* fix: hardcoded set name

* feat: show topics from readable categories on recent/popular/top

* feat: rewrite unread topics

respect watched categories and followed topics

* fix: term + watched
2019-09-26 21:55:49 -04:00
Barış Soner Uşaklı
86b16629f8 refactor: returned fields 2019-09-20 22:10:08 -04:00
Barış Soner Uşaklı
87f6ac59b1 fix: returned data 2019-09-20 19:04:47 -04:00
Barış Soner Uşaklı
307abaa8cc fix: only return necessary data for categories 2019-09-20 02:12:15 -04:00
Barış Soner Uşaklı
b81405a8cc feat: increase size of local cache 2019-09-11 18:09:39 -04:00
Barış Soner Uşaklı
6cda369872 refactor: make categories.buildForSelectCategories non async 2019-09-10 23:44:08 -04:00
Julian Lam
29f96b199c fix(style): requiring parens in block bodies 2019-08-13 15:12:27 -04:00
Julian Lam
0921230976 fix(style): updated code to follow new eslint recommendations
Squashed commit of the following:

commit f9ce878b26
Author: Julian Lam <julian@nodebb.org>
Date:   Tue Aug 13 14:30:46 2019 -0400

    fix(style): updated code to follow new eslint recommendations

commit 80dd370e41
Author: Julian Lam <julian@nodebb.org>
Date:   Tue Aug 13 14:14:58 2019 -0400

    fix(deps): update dependency sitemap to v4

    Squashed commit of the following:

    commit f4dd9cabb2
    Author: Julian Lam <julian@nodebb.org>
    Date:   Tue Aug 13 11:33:05 2019 -0400

        fix: resolved breaking changes from sitemap v4 upgrade

    commit 9043415ee1
    Merge: e3352b272 72590b346
    Author: Julian Lam <julian@nodebb.org>
    Date:   Tue Aug 13 11:09:55 2019 -0400

        Merge branch 'master' into renovate/sitemap-4.x

    commit e3352b272e
    Author: Renovate Bot <bot@renovateapp.com>
    Date:   Mon Aug 12 07:59:05 2019 +0000

        fix(deps): update dependency sitemap to v4

commit 8e3c0cdcae
Author: Renovate Bot <bot@renovateapp.com>
Date:   Fri Aug 9 00:49:51 2019 +0000

    fix(deps): update dependency commander to v3

commit 2104449d38
Author: Renovate Bot <bot@renovateapp.com>
Date:   Tue Aug 13 15:00:27 2019 +0000

    fix(deps): update dependency mongodb to v3.3.0

commit d2937f446a
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Tue Aug 13 10:36:48 2019 -0400

    feat: async/await admin/controllers

commit 1b97e8b199
Author: Misty (Bot) <deploy@nodebb.org>
Date:   Tue Aug 13 09:28:39 2019 +0000

    Latest translations and fallbacks

commit 69a48957a2
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Mon Aug 12 21:56:09 2019 -0400

    feat: async/await

commit b9b2a7e593
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Mon Aug 12 20:58:29 2019 -0400

    feat: async/await refactor

    controllers/accounts

commit a8d43a1759
Author: Baris Usakli <barisusakli@gmail.com>
Date:   Mon Aug 12 14:49:40 2019 -0400

    feat: async/await controllers/accounts

commit 2f25aae57b
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Sun Aug 11 23:09:50 2019 -0400

    fix: #7831, fix pagination

    convert to async/await

commit c9e83f2374
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Sun Aug 11 00:14:35 2019 -0400

    fix: remove empty line

commit 30be91b26c
Author: Barış Soner Uşaklı <barisusakli@gmail.com>
Date:   Sun Aug 11 00:13:41 2019 -0400

    fix: remove useless catchs and empty line

commit 2e4a71c0b6
Author: Renovate Bot <bot@renovateapp.com>
Date:   Sat Aug 10 06:51:50 2019 +0000

    chore(deps): update dependency eslint-config-airbnb-base to v14
2019-08-13 15:12:27 -04:00
Barış Soner Uşaklı
fcf3e0770b feat: #7743 categories 2019-07-16 00:41:42 -04:00
Baris Usakli
64679b37cc fix: #7647, fix getModeratorUids
sets.groupNames is an array that contains other arrays of groupnames so passing it to getMembersOfGroups returned wrong results when there were more than 1 element in it.
2019-05-29 15:44:33 -04:00
Barış Soner Uşaklı
397e062a3c fix: clear children before building tree
prevents infinite loop on databases that have children array saved in database
2019-04-06 20:33:03 -04:00
Barış Soner Uşaklı
b71e0eb179 fix: prevent infinite loops if category is already in children 2019-03-13 12:43:47 -04:00
Baris Usakli
7809ba2800 fix: #7193, closes #7194 2019-01-04 13:27:41 -05:00
Barış Soner Uşaklı
eb7ae54f81 Category watch state (#7109)
* feat: wip, category watch change

* feat: pass data to client

* feat: allow changing state

* fix: account page categories

* fix: show in unread if topic is followed or category is watched

* feat: add default watch state to acp

* feat: save user category watch state

* feat: update unread recent pages

* fix: remove dupe code

* fix: flip conditions

* fix: handle empty arrays

* fix: ignore/watch on others profile

* feat: upgrade script for category states

if there are any users ignoring categories set their state in new zset and delete cid:<cid>:ignorers

* fix: upgrade

* fix: tests

* fix: redis count

* fix: more tests
2018-12-14 16:24:17 -05:00
Barış Soner Uşaklı
263c918088 feat: remove uid:<uid>:ignored:cids (#7099)
use cid:<cid>:ignorers instead
2018-12-12 11:15:34 -05:00
Barış Soner Uşaklı
78fa734017 feat: cache category tag whitelist 2018-12-09 16:03:41 -05:00
Baris Usakli
d3c6cba33f closes #7060 2018-12-05 11:22:44 -05:00
Barış Soner Uşaklı
a63ddbe2aa fix: #7040
if category doesn't exist return null and 404
2018-12-01 17:15:38 -05:00
Barış Soner Uşaklı
29e9310aa5 dont crash for undefined categories 2018-11-29 07:55:56 -05:00
Barış Soner Uşaklı
00a066985a cache categories:cid and cid:<cid>:children
these rarely change, no need to go to db for them
2018-11-27 19:38:28 -05:00
Barış Soner Uşaklı
59eeff8f0f closes #7011 2018-11-27 11:01:46 -05:00
Barış Soner Uşaklı
53ad2bbd6e Categories optimize (#6999)
* WIP

* fix category page

* fix counts, and copyPrivileges

* fix lint

* more fixes,

* redis fix

* fix test

* fix  category test

* remove getParentsAndChildren
2018-11-25 19:08:38 -05:00
Barış Soner Uşaklı
d5af39ca5d make 1 call for parentCids 2018-11-22 18:21:43 -05:00
Barış Soner Uşaklı
eba1a405d2 load category parents and childrens in one call
add more missing guest/spider checks
2018-11-22 10:53:44 -05:00