This repository was archived by the owner on Sep 6, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
[OPEN] Find in Files Improvements (Part 1: Templates) #3324
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| {{CMD_FIND}}: | ||
| <input type="text" id="searchInput" value="{{value}}" style="width: 10em" /> | ||
| <div class="message"> | ||
| <span id="searchlabel">{{{label}}}</span> | ||
| <span style="color: #888">({{SEARCH_REGEXP_INFO}})</span> | ||
| </div> | ||
| <div class="error"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <div id="search-results" class="bottom-panel vert-resizable top-resizer no-focus"> | ||
| <div class="toolbar simple-toolbar-layout"> | ||
| <div class="title">{{SEARCH_RESULTS}}</div> | ||
| <div class="title" id="search-result-summary"></div> | ||
| <a href="#" class="close">×</a> | ||
| </div> | ||
| <div class="table-container resizable-content"></div> | ||
| </div> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,16 @@ | ||
| <div id="search-results" class="bottom-panel vert-resizable top-resizer no-focus"> | ||
| <div class="toolbar simple-toolbar-layout"> | ||
| <div class="title">{{SEARCH_RESULTS}}</div> | ||
| <div class="title" id="search-result-summary"></div> | ||
| <a href="#" class="close">×</a> | ||
| </div> | ||
| <div class="table-container resizable-content"></div> | ||
| </div> | ||
| <table class="table table-striped table-condensed row-highlight"> | ||
| <tbody> | ||
| {{#searchList}} | ||
| <tr class="file-section" data-file="{{file}}"> | ||
| <td colspan="3"><span class="disclosure-triangle expanded"></span>{{{filename}}}</td> | ||
| </tr> | ||
| {{#items}} | ||
| <tr data-file="{{file}}" data-item="{{item}}"> | ||
| <td></td> | ||
| <td style="white-space: nowrap">{{line}}</td> | ||
| <td>{{pre}}<span class="highlight">{{highlight}}</span>{{post}}</td> | ||
| </tr> | ||
| {{/items}} | ||
| {{/searchList}} | ||
| </tbody> | ||
| </table> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually the old
search-results.html, but renamed so I could use the results name for the results table.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this panel only used by find in files? I'm wondering if we only need one template rather than two (the new search-results.html template get's merged in where
{{SEARCH_RESULTS}}appears in this template)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This panel is only used for find in files currently, but could eventually be used for something else later (like replace all).
This template is used to create one time only a panel to place the results in. Once it is created on start up is not used anymore. The content template is used after every search, so merging both templates would require to destroy the current panel and re-create it after each search, and once paging is added, for every new page. I think that the current solution using 2 templates is cleaner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that seems reasonable. Thanks for the explanation!