Skip to content
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

Shortened titles #401

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Shortened titles #401

wants to merge 7 commits into from

Conversation

HeadMerchant
Copy link
Collaborator

  • Added abbreviations for words in class names
  • Long titles are now truncated with ellipses and a shortened title is shown if applicable
  • Text ascender peeking fixed (previously, long class names would have part of the title show from the bottom)
  • Abbreviations stored in /src/utils/abbreviations.js
    • Prepend nonAbbreviator to an abbreviation to have it not followed by a '.' in shortened titles
      Set the Class component's useShortenedTitle to true in order to have all classes display shortened titles, even if they aren't truncated

I don't have the full list of words in class names that are missing abbreviations because my MacBook's battery died. When I get access to the files again, I will post them.

Added shortening of titles based on OED abbreviations
Added ellispsis-based truncation

Truncation currently removes ability to break text at word boundaries (haven't found a way to resolve this).
Can now specify abbreviations that won't be abbreviated by a '.'
No longer using line-clamp
Fixed ascender text peaking in classes w/ >4 lines
Shortened titles now only appear when the longer title would be truncated
Uses modified version of vue-line-clamp based on https://github.com/AndyDyer/vue-line-clamp/tree/add-options-change-fallback-logic
@HeadMerchant
Copy link
Collaborator Author

HeadMerchant commented Apr 10, 2020

Fixes #401
Old version:
Annotation 2020-04-08 020001
useShortenedTitles = true
Annotation 2020-04-09 181832
useShortenedTitles = false
Annotation 2020-04-09 193104

'management': 'managem',
'studies': 'stud',
'biology': 'bio',
'analysis': 'anal',
Copy link
Collaborator

Choose a reason for hiding this comment

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

probably don't want this one

'advanced': 'adv',
'research': 'res',
'technology': 'tech',
'management': 'managem',
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe mgmt even? not sure how standard that is

Comment on lines +4 to +10
'and': nonAbbreviator + '&',
'i': nonAbbreviator + '1',
'ii': nonAbbreviator + '2',
'iii': nonAbbreviator + '3',
'iv': nonAbbreviator + '4',
'v': nonAbbreviator + '5',
'vi': nonAbbreviator + '6',
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's this nonabbreviator thing? does that mean v will become |5?

'certificate': 'certif',
'exercise': 'exerc',
'physiological': 'physiol',
'company': 'comp'
Copy link
Collaborator

Choose a reason for hiding this comment

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

could be confused with computer

Copy link
Collaborator

@georgiashay georgiashay left a comment

Choose a reason for hiding this comment

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

Looks good overall! Just some small changes in the comments. One other thing to consider is that maybe some people would want to turn this off. We don't necessarily need to add this now, but would it be easy to make this a setting in the future?

src/components/Class.vue Show resolved Hide resolved
src/utils/abbreviations.js Show resolved Hide resolved
src/components/Class.vue Show resolved Hide resolved
@psvenk
Copy link
Member

psvenk commented May 8, 2022

It may be a good idea to use the standard abbreviations for transcripts given by the Registrar's Office.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants