Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Tweaking/fixing find & replace #833

Closed
7 of 13 tasks
mattpass opened this issue Jun 19, 2020 · 4 comments
Closed
7 of 13 tasks

Tweaking/fixing find & replace #833

mattpass opened this issue Jun 19, 2020 · 4 comments
Labels

Comments

@mattpass
Copy link
Collaborator

mattpass commented Jun 19, 2020

The find & replace system has been completely overhauled in the dynamicPaths branch. It's now far far more efficient (about 117x in tests on a file of 10k lines with 230k chars). Many fixes also put in place, edge cases (eg find & replace on previous working too) and generally better behavior in different circumstances.

A few things remain to fix & improve, listed below:

  • Replace filenames not working (find works, doesn't replace)
  • Find & replace in filenames shouldn't be case sensitive
  • Replace text in a file doesn't update open tab edge case, added as a new issue in Replace text in a file doesn't update open tab #904
  • At present the lines in the results bar will only show if the lines are 0.5 pixels or higher. Instead have 1px lines and consider if there's any results that justify a 1px line being drawn, plus if we have a line, no need to add another. improvement, added as 1px lines in results bar #986
  • The red line in the results bar isn't indicating the current line. Set var to indicate which line we should set as red, all DOM elems have IDs and we set to red after?
  • Case insensitive across everywhere working?
  • "Match Case" - checkbox option also? New feature added to 3 new find & replace options #905
  • "Whole Word" checkbox option also? New feature added to 3 new find & replace options #905
  • "Regex" checkbox option also? New feature added to 3 new find & replace options #905
  • When finding/replacing in fiiles or filenames, is it actually searching on all, as it look a little longer than expected. Update: Yes that's the case. It's needed to some degree if we say select a dir. However, this could be passed through as the base, else pass the filename as the path Issue added More efficient finding in selected files/filenames #994
  • Replace and replace all in files not working, no JS errors, just not actioning
  • Replace and replace all in filenames not working, no JS errors, just not actioning
  • Check over JS and PHP used in all find & replace Added as an issue for future review when likely everything is completed Check over JS and PHP used in all find & replace #995
@mattpass
Copy link
Collaborator Author

mattpass commented Jun 28, 2021

Test criteria

Testing: result, no result, must be case insensitive, back, forward, cycle over end/start, find in file & dir name

Test results

General

  • With no documents open, type in find box and it errors
  • If you make changes in a couple of open docs, then click close all, it shows an alert - could do with also showing filename

Fine Type: Regular

Find/Replace This document Open Documents Selected/All Files Selected/All Filenames
Find OK OK OK OK
Replace X OK OK OK
Replace All OK OK OK OK

Notes:

Find

  • This Document
    • If your document contains "xyz", find "xyz", it selects 1st result, then add "a" to try to find "xyza", there are no results, then remove "a" it then selects the next xyz match not current Non crucial improvement to make, created issue Jumps to next result when going to a prev find value #987
    • The red block in results bar doesn't always have it set to correct line, sometimes a line out
  • Open Documents
  • Selected/All Files
    • It looks in binary files too, is that OK? No and shouldn't look in banned dirs either such as .git dir Update: have decided it's OK/more complete to look in binaries. We were only considering filenames not dir names when choosing what to exclude, now resolved.
  • Selected/All Filenames
    • Shows perms?
    • Dir names are clickable and shouldn't be, not a thing you can have in editor

Replace

Replace All

  • Selected/All Files
  • Selected/All Filenames
    • Shows always lowercase on found filename
    • Shows perms?
    • Should display "Replaced" when it's done (as it does with Open Documents)

@mattpass
Copy link
Collaborator Author

mattpass commented Jun 28, 2021

Test criteria

Testing: result, no result, must be case insensitive, back, forward, cycle over end/start, find in file & dir name

Test results

General

  • With no documents open, type in find box and it errors (eg [a])
  • With documents open, type []] (or (() as another example) and it errors

Fine Type: Regex

Find/Replace This document Open Documents Selected/All Files Selected/All Filenames
Find OK OK X X
Replace X X X OK
Replace All OK OK X OK

Notes:

Find

  • This Document
    • If your document contains "xyz", find "xyz", it selects 1st result, then add "a" to try to find "xyza", there are no results, then remove "a" it then selects the next xyz match not current Non crucial improvement to make, created issue Jumps to next result when going to a prev find value #987
    • The red block in results bar doesn't always have it set to correct line, sometimes a line out
  • Open Documents
  • Selected/All Files
    • Didn't regex find word in file, just regular
  • Selected/All Filenames
    • Should regex bold highlight the match part, only does this if regular

Replace

Replace All

  • Selected/All Files
  • Selected/All Filenames
    • Should regex bold highlight the match part, only does this if regular
    • Shows same filename to replace with? (Note: doesn't have this issue with regular find)

@mattpass
Copy link
Collaborator Author

mattpass commented Jul 1, 2021

Find in filenames also seems to scan only the DIVs in client, not scan the filenames on server.

Doesn't allow you to select all filenames as option till you click a file and then deselect it.

@mattpass
Copy link
Collaborator Author

Most items covered here and the find & replace system is so so much better. A few somewhat important items and some ideas to cover but the core items that simply weren't working in this issue now resolved.

Will close the issue and the new issues that were raised based off findings here to be planned for upcoming releases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant