Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Creating directory in File Browser #12275

Merged
merged 11 commits into from
Feb 17, 2025
Merged

Conversation

farmaazon
Copy link
Contributor

@farmaazon farmaazon commented Feb 13, 2025

Pull Request Description

Part of #12113
Fixes #12237

Screencast.From.2025-02-14.12-32-10.mp4

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

Copy link

github-actions bot commented Feb 13, 2025

🧪 Storybook is successfully deployed!

📊 Dashboard:

@kazcw
Copy link
Contributor

kazcw commented Feb 13, 2025

The animation looks odd when it removes the placeholder and inserts the "real" entry. If we could use the same key for the created directory as for the placeholder, the animation would show it moving into its sorted position.

const updateDir = mutation('updateDirectory')

function addNewDirectory() {
assert(editedAsset.value == null)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see why we can be sure this will hold

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch - the button should be disabled if editedAsset.value != null

console.error('Cannot rename directory without parentId')
return
}
const requetsBody = { title: edited.name, parentId }
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo

errorToast.show(`Failed to ${actionDescription}: ${error}`)
})
.finally(() => {
assert(edited === editedAsset.value)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this fail if the user pushes the create directory button before a previous directory creation is complete?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As above - the button should be disabled before completion.

</template>
</TransitionGroup>
</div>
<SvgButton name="folder_add" title="Add New Folder" @click.stop="addNewDirectory" />
Copy link
Contributor

Choose a reason for hiding this comment

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

The title here and the placeholder name should be consistent: "New Folder" or "New Directory"?

@farmaazon
Copy link
Contributor Author

Applied review. Now animation look much better - the screencast is updated.

@farmaazon farmaazon requested a review from kazcw February 14, 2025 11:34
Copy link
Contributor

@kazcw kazcw left a comment

Choose a reason for hiding this comment

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

There's a momentary state that looks odd, because the list has a transition when adding a new item but the dropdown panel expands instantly:

Captura de ecrã 2025-02-14, às 05 54 53

If this isn't easily fixed, I don't think it's a blocker.

@farmaazon farmaazon added the CI: Ready to merge This PR is eligible for automatic merge label Feb 17, 2025
Copy link
Contributor

@somebody1234 somebody1234 left a comment

Choose a reason for hiding this comment

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

CR ✅ for shared/dashboard code

@mergify mergify bot merged commit c9d740b into develop Feb 17, 2025
40 of 42 checks passed
@mergify mergify bot deleted the wip/farmaazon/cfb-create-dir branch February 17, 2025 15:28
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
-gui CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error message covers dropdowns
3 participants