Skip to content

fix(content-explorer): enable create folder with trailing space in name - #3246

Merged
mergify[bot] merged 3 commits into
box:masterfrom
TaoJiang98:DEVECO-6707
Feb 15, 2023
Merged

mergify[bot] merged 3 commits into
box:masterfrom
TaoJiang98:DEVECO-6707

Conversation

@TaoJiang98

@TaoJiang98 TaoJiang98 commented Feb 14, 2023 •

Copy link
Copy Markdown
Contributor

No description provided.

@TaoJiang98
TaoJiang98 requested a review from a team as a code owner February 14, 2023 18:27
this.api.getFolderAPI().create(
id,
name,
name.trim(),

@TaoJiang98 TaoJiang98 Feb 14, 2023 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Adding trim() function to remove the trailing whitespace when create button has been clicked.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I noticed there's an existing bug on line 1197, could we add a trim() there as well? it doesn't look like that if would ever enter because of the if right before it.

this way it'll be a little similar to rename functionality:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

resolved!

@QingyuChai

Copy link
Copy Markdown
Contributor

Note: edited the description to remove jira link

@tjuanitas tjuanitas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@QingyuChai QingyuChai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm! Just wondering, is there any way to add this to the tests somewhere? Just a check to make sure we are trimming the name?

@TaoJiang98

Copy link
Copy Markdown
Contributor Author

lgtm! Just wondering, is there any way to add this to the tests somewhere? Just a check to make sure we are trimming the name?

Yeah, maybe we could add test for both rename and create folder flow at content-explorer tests.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants