Skip to content

Commit

Permalink
Merge branch 'release' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmz committed Nov 24, 2023
2 parents e7f2b84 + c88fc06 commit 4e9c134
Show file tree
Hide file tree
Showing 39 changed files with 5,364 additions and 5,796 deletions.
541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.4.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.6.4.cjs
yarnPath: .yarn/releases/yarn-4.0.2.cjs
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Experimental

## [1.125.0] - 2023-11-24
### Added
- The site administrator can now define a list of "privacy control groups" in
the config (the _privacyControlGroups_ entry). These groups will be always
shown in the feed selector of new or existing posts. The pages of such groups
do not show posts by default, and such groups cannot be subscribed to.
- Support for the new "Notify of new comments" feature:
- User can now turn on/off notification for new comments on the specific post
via the "More" menu item;
- User can now turn on/off notification for new comments on their own posts;
- The new "Comments" tab has been added to the "Notifications" page.
### Changed
- The wording "Disable blocked contingent..." (in the context of groups) has
been replaced by "Show blocked content..." as more clear.

## [1.124.2] - 2023-10-25
### Fixed
- Checkboxes in texts was broken during the 'social-text-tokenizer' upgrade.
Expand Down
9 changes: 9 additions & 0 deletions config/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,13 @@ export default {
boostyProject: null,
},
},

privacyControlGroups: {
hidePosts: true, // Hide posts on these groups pages
disableSubscriptions: true, // Disable subscriptions on these groups
groups: {
// Define groups like this:
// 'public-groupname': { label: 'Makes post public', privacy: 'public' }
},
},
};
51 changes: 25 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "reactive-pepyatka",
"version": "1.124.2",
"version": "1.125.0",
"description": "",
"main": "index.js",
"dependencies": {
"@fortawesome/free-brands-svg-icons": "~5.15.4",
"@fortawesome/free-regular-svg-icons": "~5.15.4",
"@fortawesome/free-solid-svg-icons": "~5.15.4",
"@sentry/react": "~7.58.1",
"@sentry/react": "~7.81.1",
"autotrack": "~2.4.1",
"classnames": "~2.3.2",
"custom-event": "~1.0.1",
Expand Down Expand Up @@ -37,38 +37,38 @@
"react-redux": "~7.2.9",
"react-router": "~3.2.6",
"react-router-redux": "~4.0.8",
"react-select": "~5.7.7",
"react-select": "~5.8.0",
"react-sortablejs": "~2.0.11",
"react-textarea-autosize": "~8.5.3",
"recharts": "~2.8.0",
"recharts": "~2.10.1",
"redux": "~4.2.1",
"snarkdown": "~2.0.0",
"social-text-tokenizer": "~3.0.0",
"socket.io-client": "~2.3.1",
"tabbable": "~5.2.1",
"ua-parser-js": "~1.0.36",
"ua-parser-js": "~1.0.37",
"use-subscription": "~1.8.0",
"validator": "~13.11.0",
"vazirmatn": "^33.0.3",
"whatwg-fetch": "~3.6.19"
},
"devDependencies": {
"@babel/core": "~7.23.0",
"@babel/eslint-parser": "~7.22.15",
"@babel/preset-react": "~7.22.15",
"@babel/core": "~7.23.3",
"@babel/eslint-parser": "~7.23.3",
"@babel/preset-react": "~7.23.3",
"@gfx/zopfli": "~1.0.15",
"@testing-library/jest-dom": "~5.16.5",
"@testing-library/react": "~12.1.5",
"@testing-library/react-hooks": "~7.0.2",
"@testing-library/user-event": "~14.4.3",
"@vitejs/plugin-legacy": "~4.1.1",
"@vitejs/plugin-react-swc": "^3.4.0",
"@vitejs/plugin-legacy": "~5.0.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"cross-env": "~7.0.3",
"esbuild": "~0.19.4",
"eslint": "~8.51.0",
"esbuild": "~0.19.7",
"eslint": "~8.54.0",
"eslint-config-prettier": "~9.0.0",
"eslint-plugin-babel": "~5.3.1",
"eslint-plugin-import": "~2.28.1",
"eslint-plugin-import": "~2.29.0",
"eslint-plugin-lodash": "~7.4.0",
"eslint-plugin-prettier": "~5.0.1",
"eslint-plugin-promise": "~6.1.1",
Expand All @@ -79,28 +79,27 @@
"husky": "~8.0.3",
"jsdom": "~22.1.0",
"lint-staged": "~12.4.3",
"node-html-parser": "~6.1.10",
"node-html-parser": "~6.1.11",
"npm-run-all": "~4.1.5",
"prettier": "~3.0.3",
"prettier": "~3.1.0",
"querystring": "~0.2.1",
"react-test-renderer": "~17.0.2",
"rimraf": "~5.0.5",
"sass": "^1.69.2",
"sass": "^1.69.5",
"sinon": "~13.0.2",
"stylelint": "~15.10.3",
"stylelint": "~15.11.0",
"stylelint-config-prettier": "~9.0.5",
"stylelint-config-standard-scss": "~11.0.0",
"stylelint-config-standard-scss": "~11.1.0",
"stylelint-prettier": "~4.0.2",
"stylelint-scss": "~5.2.1",
"terser": "~5.21.0",
"stylelint-scss": "~5.3.1",
"terser": "~5.24.0",
"unexpected": "~13.1.0",
"unexpected-react": "~6.0.2",
"unexpected-sinon": "~11.1.0",
"url": "~0.11.3",
"vite": "~4.4.11",
"vite": "~5.0.2",
"vite-plugin-compression": "~0.5.1",
"vite-plugin-generate-file": "~0.0.4",
"vite-plugin-inject-preload": "~1.3.3",
"vite-plugin-generate-file": "~0.1.1",
"vitest": "~0.34.6"
},
"resolutions": {
Expand All @@ -110,8 +109,8 @@
},
"scripts": {
"start": "vite",
"build-prod": "vite build && vite -c vite.bookmarklet.config.js build",
"build-modern": "cross-env MODERN=1 vite build && vite -c vite.bookmarklet.config.js build",
"build-prod": "vite build && vite -c vite.bookmarklet.config.mjs build",
"build-modern": "cross-env MODERN=1 vite build && vite -c vite.bookmarklet.config.mjs build",
"preview": "vite preview",
"test": "cross-env TZ=utc vitest run",
"lint": "eslint --ext .js --ext .jsx .",
Expand All @@ -128,5 +127,5 @@
"url": "https://github.com/FreeFeed/freefeed-react-client.git"
},
"license": "MIT",
"packageManager": "yarn@3.6.4"
"packageManager": "yarn@4.0.2"
}
4 changes: 2 additions & 2 deletions src/components/comment-edit-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export function CommentEditForm({
!canSubmit
? 'Submit disabled (textarea is empty)'
: submitStatus.loading
? 'Submitting comment'
: null
? 'Submitting comment'
: null
}
onClick={doSubmit}
>
Expand Down
12 changes: 6 additions & 6 deletions src/components/create-post.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ export default function CreatePost({ sendTo, isDirects }) {
privacyLevel === 'private'
? 'Create private post'
: privacyLevel === 'protected'
? 'Create protected post'
: privacyLevel === 'public'
? 'Create public post'
: privacyLevel === 'direct'
? 'Create direct message'
: null,
? 'Create protected post'
: privacyLevel === 'public'
? 'Create public post'
: privacyLevel === 'direct'
? 'Create direct message'
: null,
[privacyLevel],
);

Expand Down
8 changes: 4 additions & 4 deletions src/components/dialog/disable-bans-dialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ export function useShowDisableBansDialog(group, isAdmin) {
return useShowDialog(
useMemo(
() => ({
title: `Disable blocking in ${uname}`,
actionLabel: `Disable blocking`,
title: `Show blocked content in ${uname}`,
actionLabel: `Show blocked content`,
action,
body: (
<>
<p>You are going to disable blocking in {uname}. What does this mean?</p>
<p>You are going to show blocked content in {uname}. What does this mean?</p>
<ul>
<li>
<p>You will see all the posts of your blocked users in {uname}.</p>
Expand All @@ -36,7 +36,7 @@ export function useShowDisableBansDialog(group, isAdmin) {
</li>
)}
</ul>
<p>You can enable blocks in {uname} at any time.</p>
<p>You can hide back blocked content in {uname} at any time.</p>
</>
),
}),
Expand Down
29 changes: 22 additions & 7 deletions src/components/feeds-selector/options.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* global CONFIG */
import {
faGlobeAmericas,
faHome,
Expand All @@ -8,10 +9,8 @@ import {
faUserFriends,
faUserSlash,
faExternalLinkAlt,
// faUsers,
// faUsersSlash,
} from '@fortawesome/free-solid-svg-icons';
import { uniq } from 'lodash-es';
import { uniq, uniqBy } from 'lodash-es';
import { useEffect, useMemo } from 'react';
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
import cn from 'classnames';
Expand Down Expand Up @@ -121,10 +120,15 @@ export function useSelectedOptions(usernames, fixedFeedNames) {

const groupOptions = useMemo(
() =>
mySubscriptions
.filter((u) => u?.type === 'group' && u.youCan.includes('post'))
.map((u) => toOption(u, me))
.sort(compareOptions),
uniqBy(
[
...privacyControlOptions(),
...mySubscriptions
.filter((u) => u?.type === 'group' && u.youCan.includes('post'))
.map((u) => toOption(u, me)),
],
'value',
).sort(compareOptions),
[me, mySubscriptions],
);

Expand Down Expand Up @@ -218,3 +222,14 @@ export function toOption(user, me) {
privacy: user.type === 'group' || isMe ? getPrivacy(user) : 'user',
};
}

function privacyControlOptions() {
return [...Object.entries(CONFIG.privacyControlGroups.groups)].map(
([value, { label, privacy }]) => ({
label,
value,
privacy,
type: ACC_GROUP,
}),
);
}
2 changes: 1 addition & 1 deletion src/components/footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function Footer({ short }) {
return (
<footer className="footer">
<p role="navigation">
&copy; FreeFeed 1.124.2-beta (Oct 25, 2023)
&copy; FreeFeed 1.125.0-beta (Nov 24, 2023)
<br />
<Link to="/about">About</Link>
{' | '}
Expand Down
4 changes: 2 additions & 2 deletions src/components/friends-page/list-editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ export const ListEditor = memo(function ListEditor({
? `Saving changes...`
: `Save changes`
: submitStatus.loading
? 'Creating list...'
: 'Create list'}
? 'Creating list...'
: 'Create list'}
</button>
<button className="btn btn-link" type="reset" onClick={doCancel}>
Cancel
Expand Down
2 changes: 1 addition & 1 deletion src/components/group-settings-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default function GroupSettingsForm({ username }) {

<div className="form-group">
<p>
<strong>Blocked users</strong>
<strong>Blocked content</strong>
</p>
<div className="checkbox">
<label>
Expand Down
3 changes: 1 addition & 2 deletions src/components/hor-scrollable.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@

.content {
width: 100%;
overflow-y: visible;
overflow-x: auto;
overflow: auto visible;
}

.container::before,
Expand Down
Loading

0 comments on commit 4e9c134

Please sign in to comment.