Skip to content

[BI-1445] - Trait Entity/Attribute/Method capitalization#240

Merged
HMS17 merged 4 commits intorelease/0.6from
bug/BI-1445
Jun 15, 2022
Merged

[BI-1445] - Trait Entity/Attribute/Method capitalization#240
HMS17 merged 4 commits intorelease/0.6from
bug/BI-1445

Conversation

@HMS17
Copy link
Contributor

@HMS17 HMS17 commented Jun 9, 2022

Description

Story: BI-1445 - Trait Column value not the same as entered in the the Term creation

Implemented changes to make capitalization of trait entity, trait attribute, and method description more consistent in table and sidepanel display.

For display in table and details panel, the first letter of each word for the trait entity, trait attribute, and method description will be capitalized
For trait attribute and method description the rest of the capitalization will match what the user entered, and on edit the user will see the capitalization as they entered it.
For trait entity, due to it being a set and therefore having to have consistent case, regardless of user entry for capitalization the first letter of each word will always be capitalized and the rest of the letters will be lowercase in both display and in edit.

  • Added display-case to main.scss which makes the first letter of each word capitalized
  • Utilized display-case instead of the custom capitalize function in ontology table and detail panel
  • Modified TraitService:getAttributesEntitiesDescriptions and OntologyTable:AttributesEntitiesDescriptions to use a large default page size so all entries will be retrieved for the autocomplete (NOTE: retrieving and using the total count of ontology terms should be implemented in a future change)

Dependencies

bi-api/BI-1445

Testing

  • Open ontology table
  • Create new ontology term with multiple words and varied capitalization
  • For new term and existing terms:
  • Check that the first letter of each word in trait and method columns in table is capitalized
  • Check that the first letter of each word for trait entity, trait attribute, and method description in detail panel is capitalized
  • For table and detail panel check that each word in trait entity is lowercase apart from the first letter
  • Open edit for ontology term, check that trait entity is all lowercase except for first letter of each word, and that trait attribute and method description are capitalized as user entered

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have create/modified unit tests to cover this change
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to documentation
  • I have run TAF: <link to TAF run>

@HMS17 HMS17 marked this pull request as ready for review June 10, 2022 00:13
@HMS17 HMS17 requested review from a team, ctucker3 and davedrp and removed request for a team June 10, 2022 00:13
@timparsons timparsons changed the base branch from develop to release/0.6 June 13, 2022 19:43
try {
const response = await TraitService.getAttributesEntitiesDescriptions(this.activeProgram!.id!);
//Want to retrieve all entries for autocomplete not just those on current page
//TODO: right now this.traitsPagination.totalCount is 0 when it hits this method, so relying on large number to retrieve all values
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you await the call to this.getTraits would that give you a this.traitsPagination.totalCount here? It might be worth implementing that now since its a small change.

@HMS17 HMS17 requested a review from ctucker3 June 14, 2022 20:07
@HMS17 HMS17 merged commit de68bee into release/0.6 Jun 15, 2022
@HMS17 HMS17 deleted the bug/BI-1445 branch June 15, 2022 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants