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 Jul 31, 2023
2 parents 6f28fe5 + d2e8d0d commit 9c5db73
Show file tree
Hide file tree
Showing 10 changed files with 504 additions and 443 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Experimental

## [1.122.0] - 2023-07-31
### Added
- Comments can now be used as checklists if the comment text starts with "[ ]"
or "[x]" (one can use other symbols in parentheses as well: [v], [*], [🗸], or
Expand All @@ -17,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

For other users, a fixed-width text representation of the checkbox is shown:
"[ ]" or "[🗸]".
### Fixed
- Telegram previews now supports dark theme

## [1.121.1] - 2023-07-15
### Fixed
Expand Down
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"use-subscription": "~1.8.0",
"validator": "~13.9.0",
"vazirmatn": "^33.0.3",
"whatwg-fetch": "~3.6.2"
"whatwg-fetch": "~3.6.17"
},
"devDependencies": {
"@babel/core": "~7.22.9",
Expand All @@ -61,19 +61,18 @@
"@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.0",
"@vitejs/plugin-legacy": "~4.1.1",
"@vitejs/plugin-react-swc": "^3.3.2",
"babel-eslint": "~10.1.0",
"cross-env": "~7.0.3",
"esbuild": "~0.18.13",
"eslint": "~8.45.0",
"eslint-config-prettier": "~8.8.0",
"esbuild": "~0.18.17",
"eslint": "~8.46.0",
"eslint-config-prettier": "~8.9.0",
"eslint-plugin-babel": "~5.3.1",
"eslint-plugin-import": "~2.27.5",
"eslint-plugin-import": "~2.28.0",
"eslint-plugin-lodash": "~7.4.0",
"eslint-plugin-prettier": "~4.2.1",
"eslint-plugin-promise": "~6.1.1",
"eslint-plugin-react": "~7.32.2",
"eslint-plugin-react": "~7.33.1",
"eslint-plugin-react-hooks": "~4.6.0",
"eslint-plugin-unicorn": "~45.0.2",
"eslint-plugin-you-dont-need-lodash-underscore": "~6.12.0",
Expand All @@ -85,20 +84,20 @@
"prettier": "~2.8.8",
"querystring": "~0.2.1",
"react-test-renderer": "~17.0.2",
"rimraf": "~4.1.4",
"sass": "^1.63.6",
"rimraf": "~5.0.1",
"sass": "^1.64.1",
"sinon": "~13.0.2",
"stylelint": "~14.16.1",
"stylelint-config-prettier": "~9.0.5",
"stylelint-config-standard-scss": "~6.1.0",
"stylelint-prettier": "~2.0.0",
"stylelint-scss": "~4.3.0",
"terser": "~5.19.0",
"terser": "~5.19.2",
"unexpected": "~13.1.0",
"unexpected-react": "~6.0.2",
"unexpected-sinon": "~11.1.0",
"url": "~0.11.1",
"vite": "~4.4.4",
"vite": "~4.4.7",
"vite-plugin-compression": "~0.5.1",
"vite-plugin-generate-file": "~0.0.4",
"vite-plugin-inject-preload": "~1.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useSubscription } from 'use-subscription';

import { cookiesEnabled } from '../services/feat-detection';

export function CookiesBanner() {
export function CookiesWarning() {
const enabled = useSubscription(cookiesEnabledSub);

return (
Expand Down
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.121.1-beta (July 15, 2023)
&copy; FreeFeed 1.122.0-beta (Jul 31, 2023)
<br />
<Link to="/about">About</Link>
{' | '}
Expand Down
14 changes: 7 additions & 7 deletions src/components/link-preview/embedly.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ export default memo(function EmbedlyPreview({ url }) {
);
});

let embedlyInitialized = false;
function initEmbedly() {
if (embedlyInitialized) {
return;
}
embedlyInitialized = true;

const id = 'embedly-platform';
if (document.querySelector(`#${id}`)) {
return;
}
window.embedly =
window.embedly || ((...args) => (window.embedly.q = window.embedly.q || []).push(args));
window.embedly ||
// We have to use the classic 'function()' here (rather than an arrow
// function) because of the way Embedly detects the type of this variable.
function (...args) {
(window.embedly.q = window.embedly.q || []).push(args);
};

const script = document.createElement('script');
script.id = id;
script.async = true;
Expand Down
5 changes: 4 additions & 1 deletion src/components/link-preview/telegram.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { useEffect } from 'react';
import { once } from 'lodash-es';
import { useSelector } from 'react-redux';

import { darkTheme } from '../select-utils';
import * as heightCache from './helpers/size-cache';
import FoldableContent from './helpers/foldable-content';

Expand All @@ -12,13 +14,14 @@ export function canShowURL(url) {

export default function TelegramPreview({ url }) {
useEffect(() => void startEventListening(), []);
const isDarkTheme = useSelector(darkTheme);
const [baseURL] = url.match(TG_POST_RE);

return (
<FoldableContent>
<div className="telegram-preview link-preview-content">
<iframe
src={`${baseURL}?embed=1`}
src={`${baseURL}?embed=1&dark=${isDarkTheme ? '1' : '0'}`}
data-url={baseURL}
frameBorder="0"
scrolling="no"
Expand Down
4 changes: 2 additions & 2 deletions src/components/signin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import ErrorBoundary from './error-boundary';
import { FieldsetWrapper } from './fieldset-wrapper';
import { Throbber } from './throbber';
import { providerTitle, useExtAuthProviders } from './ext-auth-helpers';
import { CookiesBanner } from './cookies-banner';
import { CookiesWarning } from './cookies-warning';
import { ExtAuthButtons } from './ext-auth-buttons';
import UserName from './user-name';

Expand Down Expand Up @@ -40,7 +40,7 @@ export default memo(function SignInPage() {
) : null}
<div className="col-md-12">
<h2 className="p-signin-header">Sign in</h2>
<CookiesBanner />
<CookiesWarning />
<ErrorBoundary>
<SignInForm />
<ResumeForm />
Expand Down
4 changes: 2 additions & 2 deletions src/components/signup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Link } from 'react-router';

import { signedIn } from '../redux/action-creators';
import SignupForm from './signup-form';
import { CookiesBanner } from './cookies-banner';
import { CookiesWarning } from './cookies-warning';
import { useExtAuthProviders, providerTitle } from './ext-auth-helpers';
import { ExtAuthButtons, SIGN_UP } from './ext-auth-buttons';
import { useServerInfo } from './hooks/server-info';
Expand Down Expand Up @@ -54,7 +54,7 @@ export default memo(function Signup() {
<h2 className="p-signin-header">Sign up</h2>
{showSignUpForm ? (
<>
<CookiesBanner />
<CookiesWarning />
<SignupForm />
<ExtAuthSignup />
</>
Expand Down
2 changes: 1 addition & 1 deletion test/jest/__snapshots__/link-preview.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ exports[`LinkPreview > Shows a Telegram preview 1`] = `
data-url="https://t.me/meowdobot/0000"
frameborder="0"
scrolling="no"
src="https://t.me/meowdobot/0000?embed=1"
src="https://t.me/meowdobot/0000?embed=1&dark=0"
style="height: 0px;"
/>
</div>
Expand Down
Loading

0 comments on commit 9c5db73

Please sign in to comment.