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

Add icons for play/pause/sync actions #944

Merged
merged 4 commits into from
May 30, 2023
Merged

Conversation

robertknight
Copy link
Member

Replace the placeholder emoji "icons" for play/pause actions with proper SVG icons, and add an icon for the sync button.

The SVG files were taken from the UI prototype at https://hypothesis-video-transcriptions.netlify.app and converted to Preact components using the generate-icons.js script in the hypothesis/frontend-shared repo (see also hypothesis/frontend-shared#1064).

The layout of the top bar has also been modified to more closely match the prototype. I'm not sure that we'll want to have the search bar always be visible and whether it should be above/below the buttons, but it is useful for it to have its own row where it constrained for horizontal space by the buttons around it.

Before:

(nb. Appearance of play/pause button varied by platform)

Video player before

After (Paused state):

Video player - Paused state

After (Playing state):

Video player - Playing state

Copy link
Member Author

@robertknight robertknight May 30, 2023

Choose a reason for hiding this comment

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

This file was reformatted by Prettier, but is otherwise unchanged.

@robertknight
Copy link
Member Author

robertknight commented May 30, 2023

There are some lint errors I need to resolve:

/home/runner/work/via/via/via/static/scripts/video_player/components/icons/Pause.tsx
  21:9  error  Unknown property 'fill-rule' found, use 'fillRule' instead  react/no-unknown-property
  23:9  error  Unknown property 'clip-rule' found, use 'clipRule' instead  react/no-unknown-property

/home/runner/work/via/via/via/static/scripts/video_player/components/icons/Play.tsx
  21:9  error  Unknown property 'fill-rule' found, use 'fillRule' instead  react/no-unknown-property
  23:9  error  Unknown property 'clip-rule' found, use 'clipRule' instead  react/no-unknown-property

Edit: Resolved by copying a lint override from the hypothesis/frontend-shared repo.

@robertknight robertknight force-pushed the play-pause-sync-icons branch from d561174 to b307139 Compare May 30, 2023 11:18
Copy link
Contributor

@acelaya acelaya left a comment

Choose a reason for hiding this comment

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

👍🏼

 - Import SVG icons for Play, Pause and Sync actions from the
   interactive mock at https://hypothesis-video-transcriptions.netlify.app
 - Use Prettier to format SVG files, treating them as HTML
These were generated using the `generate-icons.js` script from the
hypothesis/frontend-shared repo using:

```
cd via/static/
node ~/hypothesis/frontend-shared/scripts/generate-icons.js images/icons/ scripts/video_player/components/icons/
```

Where `~/hypothesis/frontend-shared` is the location where the
`hypothesis/frontend-shared` repo is checked out.
This was copied from src/components in the @hypothesis/frontend-shared project.
Replace emojis with SVG icons taken from the UI prototype at
https://hypothesis-video-transcriptions.netlify.app. Also adjust the layout of
the top bar to more closely match that prototype.
@robertknight robertknight force-pushed the play-pause-sync-icons branch from b307139 to 03189ce Compare May 30, 2023 13:41
@robertknight robertknight merged commit 4b71ced into main May 30, 2023
@robertknight robertknight deleted the play-pause-sync-icons branch May 30, 2023 13:42
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.

2 participants