Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Don't append a slash to file paths #9713

Merged
merged 2 commits into from
Mar 26, 2021

Conversation

jakemcdermott
Copy link
Contributor

for #9701


if (!value.endsWith('/')) {
value += '/';
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This may be addressing a different use case or bug that I am not aware of...

Copy link
Contributor Author

@jakemcdermott jakemcdermott Mar 25, 2021

Choose a reason for hiding this comment

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

I feel like removing this code is probably fine? Although I can't think of a use case off the top of my head, if someone does need to append a / they can still do it manually:

inv_slash

cc @AlexSCorey - thoughts?

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@AlexSCorey AlexSCorey self-requested a review March 25, 2021 22:10
Copy link
Member

@AlexSCorey AlexSCorey left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -126,6 +126,7 @@ const SCMSubForm = ({ autoPopulateProject, i18n }) => {
}}
aria-label={i18n._(t`Select source path`)}
placeholder={i18n._(t`Select source path`)}
createText={i18n._(t`Set source path to`)}
Copy link
Contributor Author

@jakemcdermott jakemcdermott Mar 25, 2021

Choose a reason for hiding this comment

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

The default text shown when manually setting an inventory source is kind of weird:

Screenshot from 2021-03-25 18-32-23

"Create foo/bar" makes it seem like a file or directory would be created somewhere when it wouldn't be.


When we type in a path like this, we're really just specifying a file location that may or may not exist. Our component library has a parameter for customizing the text so I changed it:

Screenshot from 2021-03-25 18-30-54

Copy link
Member

Choose a reason for hiding this comment

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

I like this phrasing

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@jakemcdermott
Copy link
Contributor Author

jakemcdermott commented Mar 26, 2021

note: branch results currently match devel results

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit f75a0ca into ansible:devel Mar 26, 2021
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.

3 participants