Merge remote-tracking branch 'upstream' into glitch

This commit is contained in:
Laura Hausmann
2023-10-12 20:16:41 +02:00
192 changed files with 2415 additions and 2113 deletions
@@ -9,11 +9,12 @@ import api from 'flavours/glitch/api';
import { roundTo10 } from 'flavours/glitch/utils/numbers';
const dateForCohort = cohort => {
const timeZone = 'UTC';
switch(cohort.frequency) {
case 'day':
return <FormattedDate value={cohort.period} month='long' day='2-digit' />;
return <FormattedDate value={cohort.period} month='long' day='2-digit' timeZone={timeZone} />;
default:
return <FormattedDate value={cohort.period} month='long' year='numeric' />;
return <FormattedDate value={cohort.period} month='long' year='numeric' timeZone={timeZone} />;
}
};
@@ -30,7 +30,7 @@ export default class Column extends PureComponent {
if (scrollable.classList.contains('scrollable--flex')) {
scrollable = scrollable?.querySelector('.scrollable') || scrollable;
}
}
}
if (!scrollable) {
return;
@@ -133,7 +133,7 @@ class Poll extends ImmutablePureComponent {
handleReveal = () => {
this.setState({ revealed: true });
}
};
renderOption (option, optionIndex, showResults) {
const { poll, lang, disabled, intl } = this.props;
@@ -78,7 +78,7 @@ class ScrollableList extends PureComponent {
const clientHeight = this.getClientHeight();
const offset = scrollHeight - scrollTop - clientHeight;
if (400 > offset && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
if (scrollTop > 0 && offset < 400 && this.props.onLoadMore && this.props.hasMore && !this.props.isLoading) {
this.props.onLoadMore();
}