-
Notifications
You must be signed in to change notification settings - Fork 214
Replace local annotation-ui with @hypothesis/annotation-ui lib #7151
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
Conversation
779739a to
966c859
Compare
| // UI (Preact) Components | ||
| // ---------- | ||
| @use '../../../annotation-ui/StyledText'; | ||
| @use '@hypothesis/annotation-ui/lib/StyledText.css'; |
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 was hoping this would work as @hypothesis/annotation-ui/StyledText.css, but it doesn't. I reckon this is not terrible anyway.
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.
Do you know why it isn't working? Does SASS not support the exports field in package.json?
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.
Does SASS not support the exports field in package.json?
Yeah, I think so. I'm even not sure it's standard to expose a stylesheet via exports or it's just a "hack" used by tailwind that bundlers happen to understand. I haven't been able to confirm this yet.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7151 +/- ##
==========================================
+ Coverage 99.39% 99.45% +0.06%
==========================================
Files 281 271 -10
Lines 11386 11012 -374
Branches 2750 2638 -112
==========================================
- Hits 11317 10952 -365
+ Misses 69 60 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // UI (Preact) Components | ||
| // ---------- | ||
| @use '../../../annotation-ui/StyledText'; | ||
| @use '@hypothesis/annotation-ui/lib/StyledText.css'; |
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.
Do you know why it isn't working? Does SASS not support the exports field in package.json?
| peerDependencies: | ||
| "@hypothesis/frontend-shared": ^9.4.0 | ||
| dompurify: ^3.0.0 | ||
| escape-html: ^1.0.3 |
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.
Only @hypothesis/frontend-shared really needs to be a peer dependency here. None of the others are used by the client outside of annotation UI rendering.
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.
True.
On the other hand, having them as peer dependencies allows for dependabot to provide updates for those packages on every individual project. I reckon it does not if they are dependencies of a dependency.
Part of hypothesis/h#9548
This is a follow-up of #7140, which replaces the local
src/annotation-uicontents with the@hypothesis/annotation-uilibrary from hypothesis/annotation-ui#1It also removes
@rollup/plugin-aliasand all the aliasing config which is no longer needed.