-
-
Notifications
You must be signed in to change notification settings - Fork 135
limit testimony committee length #1801
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
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I'll let a designer speak to the minimum viewport (though I'd guess it's Bootstrap's
Here are the short names for the committees in 194:
|
components\search\testimony\TestimonyHit.tsx the Testimony component gets its committee data from bill?.currentCommittee which in turn has the following types: if I can get an object with the committee list data, I can compare bill.currentCommittee.name against that list and write some code that will display the short name (or possibly a truncated short name as some as still kinda long) and hide the long name, but when the user taps the screen it can be displayed as a tool tip or something along those lines |
forget my prior comments Matt. V wants to just stick with the 35 char limit with elipses for now |
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 fine to me, just the one nit.
@@ -44,6 +46,14 @@ const TestimonyResult = ({ hit }: { hit: Hit<Testimony> }) => { | |||
const { user } = useAuth() | |||
const { followOrg } = useFlags() | |||
const isCurrentUser = user?.uid === hit.authorUid | |||
const isMobile = useMediaQuery("(max-width: 768px)") | |||
|
|||
function limitStringLength35Char(str: string) { |
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.
nit: We added a utility function in formatting.tsx
for this a while back - we may want to standardize on that going forward:
maple/components/formatting.tsx
Line 69 in cbca688
export const truncateText = (s: string | undefined, maxLength: number) => |
Summary
Checklist
Screenshots
Add some screenshots highlighting your changes.
Known issues
none at present
Steps to test/reproduce
For each feature or bug fix, create a step by step list for how a reviewer can test it out. E.g.: