[REG-13] Registries fixes#415
Conversation
b550bca to
3c47e75
Compare
aaxelb
left a comment
There was a problem hiding this comment.
Overall looks good, just a few things
| @@ -0,0 +1,25 @@ | |||
| {{! template-lint-disable bare-strings }} | |||
There was a problem hiding this comment.
I don't see any bare strings?
| } else if (content[i] === '}') { | ||
| contextLevel++; | ||
| } else if (content[i] === '{') { | ||
| contextLevel--; |
There was a problem hiding this comment.
If I understand the intent, I think you got these flipped. When it finds a {, should be contextLevel++ to prevent matching an end delimiter inside brackets.
just text $$ math! { $$ math } still math $$ okay text again
| export const DELIMITERS: Delimiter[] = [ | ||
| { start: '$$', end: '$$', inline: false }, | ||
| { start: '\\[', end: '\\]', inline: false }, | ||
| { start: '$', end: '$', inline: true }, |
There was a problem hiding this comment.
This one seems easy to hit accidentally, like "The GDP of Lemonadia increased from
There was a problem hiding this comment.
It will look weird but I don't actually think it will be that common to hit. However using $ expr $ seem to be fairly standard?
Currently MathJax will mess it up as well and we're explicitly opting into that behavior.
There was a problem hiding this comment.
Hm, would it be reasonable to put spaces in the delimiter? Maybe start: ' $ ', end: ' $ ' or start: '$ ', end: ' $'? I guess it feels like using a dollar symbol twice in one title or description might happen pretty often in some fields.
| (expr: string) => `This is TeX: ${expr}`, | ||
| (expr: string) => `${expr} is some TeX`, | ||
| (expr: string) => `${expr} TeX is leading and ending here ${expr}`, | ||
| (expr: string) => `${expr} ${expr} Double Trouble!`, |
There was a problem hiding this comment.
maybe a Some TeX ${expr} surrounded by text?
| @@ -0,0 +1,40 @@ | |||
| import { layout } from '@ember-decorators/component'; | |||
There was a problem hiding this comment.
looks like there's already a search-help-modal in app-components, seems like they should be united
3c47e75 to
3efcdcf
Compare
Pull Request Test Coverage Report for Build 1663
💛 - Coveralls |
e7ef604 to
89813dd
Compare
jamescdavis
left a comment
There was a problem hiding this comment.
Several questions, couple of nits
| refine_your_search: 'Refine your search by', | ||
| clear_filters: 'Clear Filters', | ||
| active_filters: 'Active Filters', | ||
| active_filters: 'Active filters', |
There was a problem hiding this comment.
I thought we were moving to sentence case for most things?
| } | ||
|
|
||
| return -1; | ||
| } |
There was a problem hiding this comment.
Are these functions useful outside this helper?
There was a problem hiding this comment.
They're exported for testing purposes. I don't really see a need to test KaTeX itself.
There was a problem hiding this comment.
Ah, ok, I was just wondering why they were exported (I obviously didn't look close enough at the tests!).
| } | ||
|
|
||
| this.import(`${katexPath}/katex.css`); | ||
| this.import(`${katexPath}/katex.js`, { using: [{ transformation: 'amd', as: 'katex' }] }); |
There was a problem hiding this comment.
Once we get ember-auto-import working for in-repo addons in TypeScript (which should work when typed-ember/ember-cli-typescript#334), this will be unnecessary, but, alas, it's the best we got atm.
|
|
||
| if (this.router.currentRouteName !== 'register') { | ||
| params.next = this.signUpNext; | ||
| } |
There was a problem hiding this comment.
Not really sure, just copying the existing behavior.
return this.router.currentRouteName === 'register' ? {} : { next: this.signUpNext };| {{/let}} | ||
|
|
||
| {{osf-navbar/auth-dropdown}} | ||
| {{osf-navbar/auth-dropdown campaign=this.campaign}} |
There was a problem hiding this comment.
campaign is a parameter that's just passed through right? Should use campaign=@campaign and remove the property from the component class.
| {{#each this.contributors as |contrib|}} | ||
| <li> | ||
| {{#if contrib.link}} | ||
| <a href={{contrib.link}}>{{contrib.name}}</a> |
There was a problem hiding this comment.
We'll eventually want this to be a link-to (or equivalent). I guess we'll parse out the route from the OSF URL in identifiers or something?
There was a problem hiding this comment.
It'll probably look similar to the title? It'd be nice if we had a link-to that checked feature flags at somepoint
|
|
||
| <div class="text-center"> | ||
| <button data-test-result-toggle-id="{{result.id}}" local-class="RegistriesSearchResult__Toggle" class="btn btn-link" aria-label={{t 'eosf.components.searchResult.showResult'}} {{action 'toggleExpanded'}}> | ||
| <button {{action 'toggleExpanded'}} data-test-result-toggle-id={{result.id}} local-class="RegistriesSearchResult__Toggle" class="btn btn-link" aria-label={{t 'eosf.components.searchResult.showResult'}}> |
There was a problem hiding this comment.
I'm a fan of {{action this.toggleExpanded}}
| } | ||
|
|
||
| module('Unit | Registries | Service | Search', hooks => { | ||
| module('Unit | Service | search', hooks => { |
There was a problem hiding this comment.
Seems like we should leave Registries in the test name somewhere?
Maybe Registries | Unit | Service | search?
817312e to
a0ee70e
Compare
app/locales/en/translations.ts
Outdated
| @@ -955,10 +955,10 @@ export default { | |||
| sidebar: { | |||
| refine_your_search: 'Refine your search by', | |||
| clear_filters: 'Clear Filters', | |||
a0ee70e to
71aa756
Compare

Purpose
Fixes for Registries from QA.
Summary of Changes
See Commits
Side Effects
Feature Flags
QA Notes
Ticket
https://openscience.atlassian.net/browse/REG-13
Reviewer Checklist
CHANGELOG.md