Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix insible log entries by replacing react-addons-css-transition-grou…
…p with react-transition-group

Just tried to follow the migration guide:

https://github.com/reactjs/react-transition-group/blob/HEAD/Migration.md

This commit addresses the issue that the invisibl log-entries
experienced with Nextcloud v24 are caused by pulling in conflicting
version of react-dom. See issue #699.

Signed-off-by: Claus-Justus Heine <[email protected]>
  • Loading branch information
rotdrop authored and icewind1991 committed Nov 28, 2022
commit 11d6b961015f9b60b7e97328a3520df03ebd4c1e
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
"postcss-nested": "^5.0.6",
"postcss-preset-env": "^7.4.3",
"react-a11y": "1.1.0",
"react-addons-css-transition-group": "^15.6.2",
"strip-loader": "^0.1.2",
"style-loader": "^3.3.1",
"react-transition-group": "^4.4.2",
"webpack": "^5.72.0",
"webpack-cli": "^4.9.2"
},
Expand Down
18 changes: 10 additions & 8 deletions src/Components/LogTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {LogLevel} from './LogLevel.js';
import MediaQuery from 'react-responsive';
import {convertDateFormat} from '../DateFormatConverter.js'
import {Settings} from './Settings';
import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
import ReactTransitionGroup from 'react-transition-group/TransitionGroup';
import ReactCSSTransition from 'react-transition-group/CSSTransition';
import {copyTextToClipboard} from '../Providers/ClipboardProvider';
import {ExceptionParser} from '../ExceptionParser';
import moment from '@nextcloud/moment';
Expand Down Expand Up @@ -64,6 +65,11 @@ export class LogTable extends Component {
};

return (
<ReactCSSTransition
key={i}
classNames="highlight"
timeout={{ enter: 1500, exit: 1500 }}
>
<tr className={className + (this.state.copyActive === entry.id ? ' ' + style.active : '')}
key={entry.id}
onClick={this.highlightRequest.bind(this, entry.reqId)}>
Expand Down Expand Up @@ -102,6 +108,7 @@ export class LogTable extends Component {
<td className={timeClass}
title={this.formatDate(entry, !this.props.relative)}>{this.formatDate(entry, this.props.relative)}</td>
</tr>
</ReactCSSTransition>
)
});

Expand Down Expand Up @@ -174,14 +181,9 @@ export class LogTable extends Component {
</th>
</tr>
</thead>
<ReactCSSTransitionGroup
transitionName="highlight"
transitionEnterTimeout={1500}
transitionLeaveTimeout={1500}
component="tbody"
>
<ReactTransitionGroup component="tbody">
{rows}
</ReactCSSTransitionGroup>
</ReactTransitionGroup>
</table>
</MediaQuery>
<MediaQuery maxWidth={768}>
Expand Down