dartdoc icon indicating copy to clipboard operation
dartdoc copied to clipboard

Dartdoc Search

Open klr981 opened this issue 2 years ago • 2 comments

Description

  • style.css: changes include a new look for the search box, how the search results are seen in the dropdown list
  • generator_utils.dart: includes a one line description that is used in the new search results
  • search_results_page.html and search_results_page.md: new templates for the search page results where the results are displayed dynamically.
  • templates.dart, validator.dart, html_generator.dart and markdown_generator.dart: changes done are to include the new search page when building docs
  • search.dart:   - categories: This function takes the search suggestion in HTML form that is going to be displayed and the library it belongs to. It takes the two inputs and inserts it in a map type Map<String, Element>, if the Map does not contain the key it adds simply adds the library as key and the value of the first suggestion.   - createCategory: This function takes input, in this case the library name and makes the necessary calls to create a HTML element.   - iterateCategoriesMap: This function iterates through the categoriesMap to added it to given HTML element. It adds the value in the map to the given html element.   - searchPageResults: This function is used when the press key enter is pressed and is directed to the search_results_page. It adds some html and uses the iterateCategoriesMap to display all the research found.   -key enter code: Now if the key enter is pressed and there is no element selected it navigates to the search results page. Since not all the docs pages have base href it looks for a specific value in the HTML to navigate to the right path.

klr981 avatar Aug 09 '22 17:08 klr981

Consider adding an entry to CHANGELOG.md, too!

kevmoo avatar Aug 09 '22 20:08 kevmoo

For #3037

keertip avatar Aug 12 '22 20:08 keertip

@srawlins the screenshots for search:

search.html

search html

Search list with more than 10 results for "string"

Search list with more than 10 results

Search page results for "string"

Search page results for string

Search list with less than 10 results for library

Search list with less than 10 results

Search results for groupings for "has"

Search results for with groupings

Search page results with groupings for "has"

Search page results with groupings

No results page

No results page

Search with less than 800 screen size

Search page with less than 800 screen size

Search list with less than 800 screen size

Search results page with less than 800 screen size

Search results page with less than 800 screen size

Search results page with less than 800 screen size

klr981 avatar Aug 22 '22 08:08 klr981

🎉 Thank you for thinking of good screenshots that I totally missed (like "no results")!

srawlins avatar Aug 22 '22 15:08 srawlins

No changes! Screenshots look great! LGTM!

keertip avatar Aug 22 '22 17:08 keertip

🎉

srawlins avatar Aug 22 '22 20:08 srawlins