-
Notifications
You must be signed in to change notification settings - Fork 414
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
Finish pspdfkit labs search #703
Conversation
Generated by 🚫 danger |
Noting that tests are still failing: I didn't go through the dance of updating CI test fixtures. Looks like the steps to do that are in CONTRIBUTING.md and will require committing changes to the text fixture repo. (also, noting that to get the rake task to work i had to Test failures at: https://travis-ci.org/realm/jazzy/builds/184429638 @captainbarbosa want to take the baton in this magical relay race of open source feature production? |
@tmcw I've updated the integration specs per the instructions in CONTRIBUTING.md @jpsim I think this is ready to go, can we get push access so we can complete the final steps? Also to note - while we were updating the integration spec, we had to update
I also had to recursively clone the submodules, which wasn't mentioned in the instructions within CONTRIBUTING.md - I can post a separate PR to include this. |
Oh hai mapbox! 👋 Thanks for pushing this forward! And of course thanks to @esad for the initial implementation.
Oh, that'd be great! Yes please. I've just granted @captainbarbosa and @tmcw push access to both this repo and the integration specs repo. |
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.
Just a few changes to make before this can go live. Nicely done @esad @tmcw @captainbarbosa !
@@ -246,6 +246,11 @@ def expand_path(path) | |||
'https://github.com/realm/realm-cocoa/tree/v0.87.1)' | |||
|
|||
# ──────── Doc generation options ──────── | |||
config_attr :unsearchable, |
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.
I think this should be named either disable_search
/--disable-search
or skip_search
/--skip-search
to match the other options.
@@ -6,7 +6,8 @@ | |||
|
|||
##### Enhancements | |||
|
|||
* None. | |||
* By default, docs are now searchable. A new option, `--unsearchable`, lets you |
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.
Only the fullwidth
theme appears to be searchable. Also, this should be reformatted to match the standard changelog entry format defined in https://github.com/realm/jazzy/blob/master/CONTRIBUTING.md#tracking-changes
With credit given to @esad, @tmcw and @captainbarbosa
@@ -0,0 +1,7 @@ | |||
/** | |||
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 0.7.0 |
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.
Should we update this to 0.7.2? https://github.com/olivernn/lunr.js/releases/tag/v0.7.2
Would you like me to address the remaining feedback points, or should I leave that to you @tmcw? |
@jpsim I made the changes as advised from your review - let me know if there's anything else I can do! |
Thanks @captainbarbosa. There's now a merge conflict with the changelog and the integration specs need to be rebuilt again. |
Here’s the rubocop failure @tmcw mentioned:
|
@jpsim We’re having some issues regenerating the integration specs. The new files from this PR are successfully added, but the docs generated for Siesta are inexplicably having sections removed: diff --git a/document_siesta/after/api-docs/Classes/Resource.html b/document_siesta/after/api-docs/Classes/Resource.html
index 1c574ce..0fd0aee 100644
--- a/document_siesta/after/api-docs/Classes/Resource.html
+++ b/document_siesta/after/api-docs/Classes/Resource.html
@@ -740,29 +740,6 @@ up to you to canonicalize your parameter order.</p>
<p>Note that, unlike load() and loadIfNeeded(), this method does <em>not</em> update latestData or latestError,
and does not notify resource observers about the result.</p>
-<div class="aside aside-parameter">
- <p class="aside-title">Parameter</p>
- Parameter method: The HTTP verb to use for the request
-
-</div>
-
-<div class="aside aside-parameter">
- <p class="aside-title">Parameter</p>
- <p>Parameter requestMutation:
-An optional callback to change details of the request before it is sent. For example:</p>
-<pre class="highlight plaintext"><code>request(.POST) { nsreq in
- nsreq.HTTPBody = imageData
- nsreq.addValue(
- "image/png",
- forHTTPHeaderField:
- "Content-Type")
-}
-</code></pre>
-
-<p>Does nothing by default.</p>
-
-</div>
- Full diff of the spec regeneration is available here. Siesta does not use the full-width theme and I therefore wouldn’t expect any changes to be made. Here’s the output from
|
The above omissions do not happen when using 0.7.3, but still happen on this branch even when the |
Yeah, the missing Siesta declaration is definitely a regression in this branch. I'm looking into it now. |
I'm guessing at this point that |
The Siesta deletions aren't new: they started happening shortly after the latest release, but before my recent PRs: #702 (comment) Do the integration specs pull in the latest version of the Siesta package, which could've changed, or does this necessarily point to a regression in jazzy? |
I think these specific siesta deletions are different, as running with the following patch preserves those asides: --- a/lib/jazzy/doc_builder.rb
+++ b/lib/jazzy/doc_builder.rb
@@ -125,11 +125,6 @@ module Jazzy
output_dir = options.output
build_docs(output_dir, source_module.docs, source_module)
- unless options.disable_search
- warn 'building search index'
- SearchBuilder.build(source_module, output_dir)
- end
-
copy_assets(output_dir)
DocsetBuilder.new(output_dir, source_module).build! |
Actually, that's not even it. If I just run the siesta specs with this branch, the asides are also preserved. They just disappear if I run the whole test suite. Leading me now to think that it's some other mutation that's causing this... |
The vanishing Siesta asides bisected to #697 — the integration spec apparently wasn’t updated properly for that PR. I’ve proposed realm/jazzy-integration-specs#25 to fix the issue, which simply accepts the deletions as proper. |
In 7825086, I went ahead and disabled the rubocop method length failure from #703 (comment). Please let me know if there’s anything I’m missing, but I believe this is what’s left to do:
Excited to get this train into the station! 🙇 |
Thanks for fixing the specs. |
Your prognosis and fixes look right to me @friedbunny! Thanks for everything. Let's get this green by pushing the rebuilt integration specs and pointing this branch to it. |
Awesome! I don’t have push access, but I was going to tag @captainbarbosa in again, anyway. 😁 |
I gave you write access in case that helps moving forward. |
Fixes from add finishing touches to PSPDFKit-search: * Fix rubocop issues * Add changelog entry * Remove unused tempfile entry * Change --searchable to --unsearchable
You got so close! Will finish finishing this finishment in #725. |
This branch addresses all of the current comments on #626: namely
The only thing that currently is tricky is that the
self.document
method is pushed from 20 to 21 lines, so it gets caught by rubocop. I see no clear way to make it shorter without making the code less direct, so happy to either adjust rubocop or take any approach the maintainers are happy with.