Closed ParthJadhav closed 1 year ago
Hey @benediktms , This PR refactors the results component, Separates the logic & adds path on right side of full drive search.
@ParthJadhav I think it looks good, some suggestions I have:
fileParentDir/fileDir/fileName
we could display root/.../fileParentDir/fileDir/fileName
where root could be the VCS rootWhat do you think?
I actually didn't understand what VCS
mean 😅
Sorry I meant version control repos like git. But I thought maybe it would be a good to be version control agnostic. But probably that can be added if and when it's needed. We could just start with git.
I'll work on it tomorrow 🤝
- As a followup we could also truncate from some sort of meaningfull directory to give the user and understanding where generally the file is, for example rather than:
fileParentDir/fileDir/fileName
we could displayroot/.../fileParentDir/fileDir/fileName
where root could be the VCS root
I still quite didn't understand... Can u give me an example?
currently only 2 parent folders are displayed: fileParentDir/fileDir/fileName
. This is better but for files that are nested deeper, e.g. app/pages/page1/components/index.ts
This pattern might have lots of folder named components
and lots of files named index.ts
. In cases like this there are 2 solutions:
Both options are fine but probably option 2 is better. In cases where the total path name is very long, we should truncate the final output to not clutter the UI. E.g.:
some-project/app/pages/feature/componets/edit/state.ts
could become
some-project/.../components/edit/state.ts
otherwise depending on how deeply nested the file is, the full file path might not fit in the results view because it is too wide.
Gotcha, I'll create a different Issue for that...
Will merge this @benediktms
closes: #33