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

Resolves #109, File Tree Lines can be Added to Exclude/Include Pattern Through Click #153

Merged
merged 7 commits into from
Feb 4, 2025

Conversation

DavidUlloa6310
Copy link
Contributor

@DavidUlloa6310 DavidUlloa6310 commented Jan 24, 2025

Made a couple of changes to finish the feature:

  • Added some javascript code in result.jinja to add or remove file names to the patter input.
  • Placed an onchange handler on the pattern selector to change CSS classes depending on whether "exclude" or "include" is selected. The simplest way to do this was to toggle all the classes, since it handles already selected files as well without any extra logic.

@cyclotruc feel free to let me know what you think! You also mentioned wanting to add some kind of notice to users that the items were clickable - do you think adding some text above the file tree would be the best way to do that?

@DavidUlloa6310 DavidUlloa6310 changed the title Implement Issue #109, File Tree Lines can be Added to Exclude/Include Pattern Through Click Resolves Issue #109, File Tree Lines can be Added to Exclude/Include Pattern Through Click Jan 24, 2025
@DavidUlloa6310 DavidUlloa6310 changed the title Resolves Issue #109, File Tree Lines can be Added to Exclude/Include Pattern Through Click Resolves #109, File Tree Lines can be Added to Exclude/Include Pattern Through Click Jan 24, 2025
@cyclotruc
Copy link
Owner

@DavidUlloa6310 Thank you for this PR, taking a look asap

Copy link
Owner

@cyclotruc cyclotruc left a comment

Choose a reason for hiding this comment

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

Incredible!

Very clean lightweight implementation thank you so much

@cyclotruc
Copy link
Owner

@DavidUlloa6310 great pr, thanks again

There has been a recent restructure of the repo which requires a rebase with main
I would do it myself but I can't find a way to push on your branch

You can give me access or do it yourself:
simply move
git_form.jinja and result.jinja into their new location in src/server/templates

@cyclotruc cyclotruc added the planned This will be implemented label Jan 24, 2025
@DavidUlloa6310
Copy link
Contributor Author

DavidUlloa6310 commented Jan 26, 2025

@DavidUlloa6310 great pr, thanks again

There has been a recent restructure of the repo which requires a rebase with main I would do it myself but I can't find a way to push on your branch

You can give me access or do it yourself: simply move git_form.jinja and result.jinja into their new location in src/server/templates

@cyclotruc thank you for the compliments! I went ahead and did the rebase - let me know if everything looks good to merge

Copy link
Owner

@cyclotruc cyclotruc left a comment

Choose a reason for hiding this comment

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

While testing I noticed a bug:
image

The copy button on the directory structure doesn't work anymore
I think it's because you used divs in the output box, and the current js for the copy button is looking for another container.

I think it could be solved with a hidden variable containing the content that needs to be copied when the button is clicked

Also but less important, for the CI to pass, you need to run the pre-commit hooks, you can install them by running pre-commit install

If you me to want help on this, you can allow me to your repo i'd be happy to fix this :)

@DavidUlloa6310
Copy link
Contributor Author

Sounds good! Thanks again for the help - I was totally confused as to why the test was failing. I just sent you an invite to my fork of the repo

@cyclotruc
Copy link
Owner

@DavidUlloa6310 I ran the pre-commit hooks and fixed the issue with the copy button using a hidden field containing the original tree content

Merging this, Thanks a lot for your contribution!

@cyclotruc cyclotruc merged commit 11d3f39 into cyclotruc:main Feb 4, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
planned This will be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants