-
Notifications
You must be signed in to change notification settings - Fork 3
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
Feature/corpus doc order #1626
Feature/corpus doc order #1626
Conversation
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.
Looks good!
I think the more proper solution would be to make the underlying values of the type
field integers instead of strings, but I agree that efficiency isn't relevant given the small number of objects.
Looks like 2 unrelated files snuck into your branch, but I see no issue with merging them.
LICENSE = ('license', 'Licence') | ||
LICENSE = ('license', 'License') |
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.
import * as _ from 'lodash'; | ||
import { Router } from '@angular/router'; | ||
import { HttpErrorResponse } from '@angular/common/http'; | ||
import { Subject } from 'rxjs'; | ||
|
||
@Component({ | ||
selector: 'ia-create-definition', | ||
templateUrl: './create-definition.component.html', | ||
styleUrls: ['./create-definition.component.scss'] | ||
styleUrls: ['./create-definition.component.scss'], |
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 considered making the types a proper Enum, but that would make adding more documentation pages between existing ones more difficult (read: requiring data migrations). |
Resolves #1607
Takes the choices of the
type
field in the backend as canonical order, to make it easy to extend the types at a later stages.I realize using
.index()
as key is not the most efficient way to sort, but it's a small amount of pages.