Skip to content

Fixed archive inherits at folders#320

Open
dibyanshu-pal-kushwaha wants to merge 2 commits intoStatTag:masterfrom
dibyanshu-pal-kushwaha:Unarchive-descendants
Open

Fixed archive inherits at folders#320
dibyanshu-pal-kushwaha wants to merge 2 commits intoStatTag:masterfrom
dibyanshu-pal-kushwaha:Unarchive-descendants

Conversation

@dibyanshu-pal-kushwaha
Copy link
Contributor

Description :

Currently , when we achive the Top folder , only it get archived not inherited to the all the descendants , and when we unarchive the top folder then all the already archived child files/folders remains archived. In this solution when you archive the Top folder , all the descendants get Archived and when we Unarchive the top folder , a popup pops out asking to Unarchive all the already descendants files/folder or keep them as it is.

Fixes

Fixes : #217

Changes :

  1. app/utils/asset.js: Added recursive functions
  2. app/components/AssetTree/AssetNode/AssetNode.js: Added the ancestorArchived prop to visually gray out all child files when their parent folder is archived.
  3. app/components/Project/Project.js: Built the "Unarchive All" confirmation dialog.
  4. test/utils/asset.spec.js: Added comprehensive unit tests .
  5. app/containers/ProjectPage/ProjectPage.js: Re-assigned the selectedProject state

Screen Recordings :

UnarchiveDescendants.mov

Copy link
Contributor

@lrasmus lrasmus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really, really great work. I'm not sure if it was on purpose, but this PR removes onDirtyStateChange from the project component, and I wasn't sure why. If you could double-check that was intentional, and if so please let me know why that removal is needed. Thanks!

import styles from './Project.css';
import UserContext from '../../contexts/User';

type Props = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason onDirtyStateChange was removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that Sir , it was changed accidentally during making these changes... I have added onDirtyStateChange back into the code in the latest commit....

project={this.props.project}
updates={this.props.logs ? this.props.logs.updates : null}
onClickUpdatesLink={this.clickUpdatesLinkHandler}
onDirtyStateChange={this.props.onDirtyStateChange}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason onDirtyStateChange was removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in the latest commit.

onUpdated: PropTypes.func,
onAssetSelected: PropTypes.func,
onChecklistUpdated: PropTypes.func,
onDirtyStateChange: PropTypes.func,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason onDirtyStateChange was removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in the latest commit.

onUpdated: null,
onAssetSelected: null,
onChecklistUpdated: null,
onDirtyStateChange: null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason onDirtyStateChange was removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in the latest commit.

@dibyanshu-pal-kushwaha
Copy link
Contributor Author

dibyanshu-pal-kushwaha commented Feb 28, 2026

@lrasmus , I put back all changes , Please review this pr.
Thanks you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Archive - inherit at folders

2 participants