Skip to content

Conversation

@dewanshDT
Copy link
Collaborator

@dewanshDT dewanshDT commented Feb 16, 2023

Fixes #2106

Changes:
I've made changes in the client/modules/IDE/components/FileNode.jsx file.

{middleText.charAt(middleText.length - 1) === ' ' && <span>&nbsp;</span>}

I've added this in FileName() function, as the html syntax was not detecting the space after the middle text which was causing the issue to occur, now it is fixed
p5fixed

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

@welcome
Copy link

welcome bot commented Feb 16, 2023

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

@dewanshDT
Copy link
Collaborator Author

I further optimized it for any other space related issues and simplified using React.Fragment instead of <span>

<span className="sidebar__file-item-name--ellipsis">
          {middleText.charAt(0) === ' ' && <>&nbsp;</>}
          {middleText.trim()}
          {middleText.charAt(middleText.length - 1) === ' ' && <>&nbsp;</>}
</span>

@dewanshDT dewanshDT changed the title space fixed file drawer filename space issue fixed Feb 17, 2023
@lindapaiste
Copy link
Collaborator

lindapaiste commented Feb 18, 2023

I think there's a simpler solution here via CSS.

Changing .sidebar__file-item-name--ellipsis from white-space: nowrap; to white-space: pre; seems to do it.

@dewanshDT
Copy link
Collaborator Author

dewanshDT commented Feb 19, 2023

@lindapaiste Thanks! I updated it

Copy link
Collaborator

@raclim raclim left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@raclim
Copy link
Collaborator

raclim commented Feb 21, 2023

This is great, thanks so much @dewanshDT and @lindapaiste!

@raclim raclim merged commit 31b4bb3 into processing:develop Feb 21, 2023
@kjhollen
Copy link
Member

Hooray, thank you!

@lindapaiste
Copy link
Collaborator

@raclim it’s great to see that you are reviewing PRs and this project is not dead! I have a bunch of stale PRs from July and August that are still sitting open. I stopped contributing after that because no one was looking at my contributions, but I would love to do more. Can you take a look at my open PRs? If I’m changing too much then maybe you can suggest what I should focus on. There’s quite a lot of old/outdated code which can easily be refactored so that’s mostly what I was doing.

@raclim
Copy link
Collaborator

raclim commented Feb 23, 2023

Thanks @lindapaiste for checking in and bringing this up, I'll try to take a look and have notes for your PRs by sometime early next week! I really appreciate your efforts and understanding, and would love for this project to receive more of your insight :)

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.

File drawer doesn't show spaces in file names

4 participants