Commit Graph
263 Commits
Author SHA1 Message Date
sua yoo 17539f3084 feat: Add "not found" error detail on page load (#482)
Resolves https://github.com/webrecorder/replayweb.page/issues/481 with
workaround
Related to https://github.com/webrecorder/browsertrix/issues/2865

## Changes

- Includes `replayNotFoundError` in `"page-loading"` event when page is
finished loading as a workaround for the actual `replayNotFoundError`
value not being available on `urlchange`.
- Minor refactor to more strongly typed events.
2026-02-11 23:58:28 -08:00
Ilya KreymerandTessa Walsh 916b154688 Add resources download button + click to download picker in replay (#469)
Fixes #467 
- Add a download button on the resource page for each entry to allow
downloading each resource no matter what type.
- Add a new 'click to download' image or media picker that allows
highlighting + clicking on image/media to download on the page (to get
around 'Save Image As...) not working. Also supports inline svgs +
background images - should work better than Save Image As...
- Location bar shows a popup indicating in 'click to download' mode,
which can be canceled. Otherwise, mode remains until user downloads
something.
- Type fixes: Untangle Page and URLResource types for better type
checking.
- Deps: bump to wabac.js 2.25.1 for new download mode support

---------
Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
2025-12-05 09:21:17 -08:00
Ilya Kreymer 1b56d3e03a ui/replay fidelity: add 'color-theme: light dark' to replay container (#460)
allows propagating the theme to replay iframe!

fixes part of issues with webrecorder/archiveweb.page#320 where
different resources are loaded based on theme
2025-10-12 12:43:45 -07:00
Emma Segal-Grossman 3660c3b89e Ensure icon size is applied just to outer SVG (#458)
Due to changes in chrome (https://issues.chromium.org/issues/40409865),
width and height presentation attributes within nested SVGs are now
respected, which breaks icons styling in RWP. This fixes that by
ensuring that the styling that sets width and height on the outer icon
SVG _only_ applies to the outer SVG, allowing the inner SVG's
intrinsic/declared size to be respected properly.

Tested in latest chrome, firefox, and safari on macos.

Fixes #457
2025-10-03 12:30:55 -07:00
Ilya Kreymer 05d117f374 linux build: add gtk version flag to fix incompatibility, fixes #430 (#436) 2025-06-14 19:45:32 -04:00
Ilya Kreymer 6ee91ad4d7 Fix s3:// resolving, don't use origin for non-standard URLs, fixes #432 (#434) 2025-06-14 15:06:12 -04:00
Ilya Kreymer af7dc7a6c3 Electron app loading improvements + Windows paths fix (#429)
- Electron no longer allows Windows paths in URLs
(https://www.electronjs.org/docs/latest/breaking-changes#behavior-changed-custom-protocol-url-handling-on-windows),
fixes with help of wabac.js to replace `C:\path\to\file` with
`C//path/to/file`
- Electron app cleanup: replace deprecated protocol handlers with new
protocol.handle() method, update types
- Electron app: ensure just filename is displayed on index page,
consistent with other platforms
- Update to wabac.js 2.23.2
- Update to Electron 36.3.2
- Fixes #427
- bump to 2.3.12
2025-05-30 13:15:54 -07:00
Ilya Kreymer 62c30e7838 Fix ruffle injection + disable gdrive in library build (#419)
library: disable GDrive integration in library build (for AWP use)
fidelity: Fix Ruffle injection, rewriting improvements (via wabac.js
2.22.17)
loading: Support .wacz.zip extension for loading WACZ files when .zip is
auto-added (eg. on Android devices)

deps: bump to wabac.js 2.22.17
bump to 2.3.8
2025-05-06 21:07:24 -07:00
Sebastian Alvarez e2c3f69c7e fix not being able to tab into the web page (#411)
Fixes #371
2025-04-29 18:16:22 -07:00
Ilya Kreymerandemma 592ccc5253 Add 'utils' module export (#410)
Export core utils and assets used by RWP in /utils.
Add serviceWorkerActivated() utility promise.

---------

Co-authored-by: emma <hi@emma.cafe>
2025-03-12 21:55:29 -07:00
Ilya Kreymer 2ef95985cd downloadUrl support for multiWACZ + latest wabac (#407)
main menu tweaks:
- use downloadUrl for action menu download
- don't show download menu if downloadUrl is null
- don't show Archive Info if downloadUrl !== sourceUrl and in embed mode

improved loading: update to wabac.js 2.21.3

bump to 2.3.3, update CHANGES for release
2025-03-04 11:37:20 -08:00
Emma Segal-Grossman 64dc599532 Add basic date & time formatters using navigator language (#404)
Adjacent to #400 — while this isn't yet a proper localization pass, at
least dates & times will now use the user's browser language/locale
settings. When used in Browsertrix, this should ensure dates are
formatted more consistently, at least when the user has a locale with a
language matching one of the supported languages in Browsertrix set in
their browser settings.

Also adds tabular numerals in a few places (e.g. lists of dates/times).
2025-03-04 13:52:06 -05:00
Ilya Kreymer 4c96ea6cb3 Additional fixes for dynamic page loading optimization (#402)
- Update to wabac.js 2.21.1
- Hide 'Show non-seed pages' when doing a dynamic query
- bump to 2.3.1
2025-02-24 18:01:29 -08:00
Ilya Kreymer 6ef8bf4973 Support for dynamic page loading for Multi-WACZs (#399)
Support querying pages dynamically via pages endpoint:
- If loaded pages < total pages, load additional pages via /pages
endpoint if canQueryPages is set to true on item
- If query provided, do `/pages?search=...` to search for pages. Use
pagination of 25 pages for now.

WACZ hash:
- if provided, store waczhash per page, and use for thumbnail, favicon
and top-level replay loading.

Embed: better support for force reloading, call delete with reload
directly in embed

Depends on webrecorder/wabac.js#220
2025-02-24 14:35:03 -08:00
94cbf5e43d fix: Loading indicator fixes (#398)
Resolves https://github.com/webrecorder/replayweb.page/issues/397

## Changes

- Uses animated logo when loading
- Show non-animated logo for error and other states where user action is required.
- Only shows progress bar if progress is >0
- Fixes WARC progress bar percentage lagging behind displayed "Loaded"
values
- Fixes "Cancel" not redirecting back to initial view
- Removes extra spacing from logo image file

---------

Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2025-02-11 23:17:01 -08:00
Henry Wilkinson bbce684c9e Adds CDXJ as a valid format 2025-01-15 15:01:11 -05:00
Henry Wilkinson 89204f3d95 List CDX as a supported file type in the app 2025-01-15 14:57:15 -05:00
Henry Wilkinson 4059f6258d fix: Allow CDX file loading 2025-01-15 14:54:31 -05:00
sua yooandemma 09239285a1 fix: Support description markdown and longer length (#385)
Fixes https://github.com/webrecorder/replayweb.page/issues/381

## Changes

- Renders description as markdown
- Shows "Collection name" and "About this collection" labels when
description is present
- Fixes overflow issue where bottom few pixels of embed is cut off
- Hides description in mobile view

Co-authored-by: emma <hi@emma.cafe>
2024-12-31 19:49:42 -08:00
Emma Segal-Grossman c2ebbed7dc Rename exported Embed to ReplayWebPage, and export EmbedReplayEvent type (#384)
Closes #376
2024-12-23 16:12:45 -05:00
2f798eeacb Update Site Links and Branding (#375)
Partially addresses https://github.com/webrecorder/website/issues/133

- Adds link to ReplayWeb.page marketing site instead of the docs on the
homepage to better explain the product to new users
- Updates embed receipt with company logo
- Minor capitalization fixes and copy updates.

### Screenshots

<img width="677" alt="Screenshot 2024-11-23 at 2 10 38 AM"
src="https://github.com/user-attachments/assets/1f1fef82-12fb-460c-9757-cf0cb70bc281">

<img width="696" alt="Screenshot 2024-11-23 at 2 15 20 AM"
src="https://github.com/user-attachments/assets/2991bd43-d563-492e-9575-5201ff31a91e">

---------

Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2024-12-11 16:45:43 -05:00
Ilya Kreymer 9fa008bab2 Nested WACZ + embed reloading fix (#374)
- Loading: Fix for loading nested WACZ files (via wabac.js 2.20.7)
- Embeds: Support full reload on embeds via fullReload() call on embed
web component
2024-11-22 17:58:44 -08:00
Henry Wilkinson 218c1ed14f Minor docs updates & Link Updates (#361)
### Changes
- Fix docs edit URL
- Update links to new webrecorder.net pages
2024-11-01 09:43:27 -07:00
Ilya Kreymer 95c9be6c5b Support for import as module, wabac.js 2.20 (#364)
- Extensibility for AWP (customizable toolbar, pass replay iframe messages to parent)
- Support export as module, build separate index.js for module in addition to ui.js
- Update to wabac.js 2.20.0
- bump to 2.2.0
2024-10-16 20:22:11 -07:00
Henry WilkinsonandIlya Kreymer 28fd66b289 Update src/item-index.ts
Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
2024-09-18 22:01:52 -04:00
Henry WilkinsonandIlya Kreymer 2241b4a76a Update src/item-index.ts
Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
2024-09-18 22:00:46 -04:00
Henry Wilkinson e53c74dc51 Updates "No archives yet?" text
Gives new users links to our tools for making web archives!
2024-08-26 14:04:14 +01:00
Ilya Kreymer ce9447c861 deps: update to wabac.js 2.19.2 (wombat 3.7.10) (#348)
includes sharepoint fidelity (fixes #273)
ui: default URL resources search to 'prefix' (as contains only works after prefix search)
version: bump to 2.1.1
2024-07-05 13:02:24 -07:00
Ilya Kreymer 11ca78c5b6 Remove multiTs from location hash (#340)
Just keep as regular property on Item, as no need to read it from user
input, as multiTs is looked up from wabac API.
2024-06-21 15:46:47 -07:00
Ilya Kreymer 105562abf9 add window message notifications for embeds: (fixes #333) (#335)
- add 'replayNotFoundError' field to 'urlchange' (propagating
'archive-not-found' postMessage message from wabac.js) to embed frame, with url/ts, for 404
pages
- propagate 'page-loading' with loading true/false, to indicate when a
page started/finished loading. (URL not available here)
- Only send one urlchange event per URL change (keep track of change).
- Also ensure multi timestamp change uses replaceHistory to avoid an extra
navigation.
- replay-web-page embed: send rwp-url-change and rwp-page-loading custom events from webcomponent

Fixes #333
2024-06-21 14:47:18 -07:00
Emma Segal-Grossman 1feee354c7 Configure package exports explicitly (#336)
Closes #337
Blocks https://github.com/webrecorder/archiveweb.page/issues/198

Adds a dedicated `misc` export, as well as explicitly exporting the
`electron-*` files and the `index.html` file. This restricts imports to
only these files, and allows us to not have to exactly match webpack
configs between RWP and AWP.
2024-06-18 21:41:21 -04:00
Ilya Kreymer 2700797b6a Resource search remove auto-added http prefix (#334)
- remove previous optimization that auto-added 'https://' prefix to search
queries, which resulted in 'urn:' resources not being searchable.
also caused unintuitive behavior, where 'ht' would show no results while
'http' would, now fixed. Results in more predictable search results in
the end.
- Also default to contains instead of prefix search by default
2024-06-18 18:38:48 -07:00
sua yoo 9cfeca3428 Upgrade Shoelace & Lit (#329)
Related to https://github.com/webrecorder/browsertrix/issues/1836 --
Upgrades Shoelace and Lit to match browsertrix.
version: bump to 2.0.2
2024-06-12 11:48:08 -07:00
Ilya Kreymer 7229609ed0 2.0.1 work - fidelity + build improvements (#327)
Fidelity improvements (via wabac.js and wombat):
- fixes ebay carousel #326 (via wombat)
- partial fix to error page escaping #323 (via wabac)
- fixes to reddit pages #317 
- fixes to twitter/x replay (via wabac / wombat)

Build improvements:
- run mkdocs gh-deploy --force in gh action, instead of publish-docs to avoid accidental updates
- auto install ruffle from download script, remove from git, add 'update-ruffle' script
- update to latest ruffle which doesn't inject setImmeidate/ clearImmediate to avoid interference with certain sites, fixing fidelity on some sites (including twitter/x)
- remove unused src/sw.ts
- deps: wabac.js to 2.18.2

bump to 2.0.1
2024-06-09 17:38:38 -07:00
Ilya Kreymer 14462c1506 final fixes + changelist for 2.0.0!
- package: add adblock/adblock.gz to npm package
- electron: remove ./site/
- add CHANGES for 2.0.0
2024-04-10 18:38:38 -07:00
Ilya Kreymer 0814e28778 Adblock Support for Embeds (#308)
Fixes #307 

- Adds optional adblock support, via wabac.js (dependent on
webrecorder/wabac.js#167).
- For now, adblock enabled only for embeds via the `useAdblock`
attribute, and can be enabled per archived item.
- By default, adblock filter rules from
[EasyList](https://easylist.to/easylist/easylist.txt) are used, however,
a custom filter rules file can be used via `adblockRulesUrl` attribute
(default is ./adblock/adblock.gz)
- Added `fetch-adblock.sh` script to fetch latest easylist, filter out
`##` rules and compress to `./adblock/adblock.gz`
- Not yet possible to enable adblock for standalone browsing via
replayweb.page
- bumps version to 2.0.0-beta.3
2024-04-10 16:27:04 -07:00
Ilya Kreymer 92343d59f7 Site reorg: Remove site/ subpath (#306)
Unfortunately, for proper package pathing, need to remove the `site/`
subpath. This includes:
- Moving everything back into root
- Adding a `copy-site.sh` script to copy resources into `mkdocs/site/`
before building the site with mkdocs.
- Also update examples to ensure all are loading the local sw.js / ui.js
- Consolidate examples in `docs/examples`
- Consolidate assets under src/assets/
- Move `favicons` to root
- Reformat and relint
- Tests: update playwright tests to use mkdocs output, add test for
embed in docs
- bump to 2.0.0-beta.2
2024-04-09 23:07:23 -07:00
Ilya Kreymer 01a6ebc5b6 Electron Fix for 2.0.0 (#304)
- build UI.js to site/ directly (build electron to dist/)
- no longer need to copy favicons
- load site assets directly from site/
2024-04-09 15:33:43 -07:00
Henry WilkinsonandIlya Kreymer 00f01222a7 Adds sl-copy-button fontawesome icons (#302)
- Changes `sl-copy-button` icons to use fontawesome equivalents so they
fit in with everything else in ReplayWebpage
- Converts sl-icon to use fa-icon for error icon
- Adds missing whitespace

Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2024-04-09 15:01:10 -07:00
Ilya KreymerandHenry Wilkinson 858f9d61bb Convert URL encoded images to inline SVGs with fa-icon (#303)
Avoid data: URL loading and just inject SVG inline directly for logo, receipt and loader
Additional favicon path fixes

---------
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
2024-04-09 15:00:08 -07:00
Henry WilkinsonandIlya Kreymer cbe98c4fa1 Reasonably Scoped Branding Update (#299)
- Adds TsconfigPathsPlugin
- Custom icons, branding assets, and favicons now all live under
`/src/assets` in organized folders (Mirrors Browsertrix folder
organization and naming)
- Assets can now be referenced with `import: varName from
~assets/assetpath` app wide!
- SVGs continue to use `svg-inline-loader`, favicons are copied to
`/site/favicons` on app build
- Adds favicons to the main `index.html` page for ReplayWeb.page and
`embed.html` example page
- Replace README header with new branding
  - Lives under /assets because it's not app related
- Adds new webmanifest app icons
- Adds new Electron app .icns (macOS ) and .png (Windows & Linux) app
icons
- Replaces globe icon in the embed receipt with ReplayWebpage icon!
  - Adds lockup to the footer section
- Removes logo animation
- Removes logo values from `renderErrorReport()` in swmanager.ts in
favour of additional import statements

---------
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2024-04-08 18:47:17 -07:00
Henry Wilkinson ef6c748170 2.0 UX Changes (#295)
Partially addresses #237
- Unhides the load button on smaller screen sizes
  - There's no way to actually load new web archives when this is hidden
- Minor text updates
  - Renames MIME Type to Media Type
  - Punctuation fixes
- Reorder main application controls (#237)
  - Group navigation related controls together on the left side
  - Move full screen to the right side
  - Enable navigation controls on mobile
- Renames URLs tab to Resources - now that we have more space (because we moved the archived item info
to a dialog), we can make these titles visible when space is available to do so!
  - This is now in-line with the docs (both current and new!)
2024-04-07 14:52:15 -07:00
Henry WilkinsonandIlya Kreymer 88ca04e52e Add example links to exploring section (#298)
- Moves example WARC files to /site/examples
- Adds example link for full text search
- Adds example link for searching resources
- Updates example docs link on the app homepage, sends to the project
showcase section
- Link fix
- .gitignore update
---------

Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2024-04-07 14:48:58 -07:00
Henry Wilkinson d276609ffe Removes WBN file options
WBN files are unsupported and don't work but are still allowed to be selected by users and are still displayed as valid options.

No longer!
2024-03-19 12:05:51 -04:00
Ilya Kreymerandemma 6051a2a414 feature: allow embed <replay-web-page> to also support updating favicons from replay (#287)
It may be useful to be able to have <replay-web-page> embed also take
over the favicons for the page, propagating them from the replay (eg. if
in a single page app where replay takes up most of the view).

This PR adds a `updateFavicons` attribute, used as `<replay-web-page ...
updateFavicons>` to have icons propagated from the replay to the
top-level frame. (This may be especially useful with `deepLink` option,
which allows for linking directly to archived pages)

Details:
  - enabled via 'updateFavicons' attribute on <replay-web-page>
- pass icons via postMessage() update, adding type to embed message to
allow different types of message
  - currently supporting 'urlchange' and 'favicons' message types
- add shared updateFaviconLinks() in misc.ts, used by both embed and
main app

---------
Co-authored-by: emma <hi@emma.cafe>
2024-03-07 21:28:50 -08:00
Emma Segal-Grossman 5c7b914e69 Typescript config parity with Browsertrix repo (#289)
Follow-up from #288 

This matches the strictness rules with the Browsertrix repo,
specifically `noImplicitAny`, and then adds `// @ts-expect-error`s to
suppress existing errors this change raises. This'll help us keep code
quality high moving forward.

Going to just directly merge this once it passes CI; as with #288, this
doesn't change any code, just comments.
2024-03-07 21:12:26 -05:00
Emma Segal-Grossman 40d84f3383 ESLint parity with the Browsertrix repo (#288)
This copies the rules from the Browsertrix repo, and uses
[`suppress-eslint-errors`](https://www.npmjs.com/package/suppress-eslint-errors)
to suppose the violations. I'll take a pass at cleaning this up at some
point in the future, and let's do our best to address these in the
future as we come across them :)

This'll help ensure new code being added to this repo is held to the
same standard as code in Browsertrix's frontend.
2024-03-07 20:12:50 -05:00
Emma Segal-Grossman b39d17d637 Tab list disappears with an empty WARC (#284)
Closes #283 

Not too sure what the root of the problem actually is, but removing the
overflow seems to fix it, though it does change the sizing somewhat.
I've adjusted the padding to compensate, so it should look the same as
it did before.

The source rules are coming from Bulma, which I don't know super well,
so I don't mind overriding it in this context rather than trying to fix
the underlying issue here.
2024-02-21 19:21:45 -08:00
Emma Segal-Grossman a63390f10c Update NPM packaging, linting, and a bunch of types (#275)
Preparation for
https://github.com/webrecorder/archiveweb.page/issues/198 /
https://github.com/webrecorder/archiveweb.page/pull/199.

## Changes

- Organizes published files more cleanly, using `dist/types` folder as
the target for type declarations and sourcemaps
- Configures type field in `package.json`
- Updates ESLint & its config
  - Sets up type-informed linting rules mirroring browsertrix
- Adds a bunch of other useful eslint and eslint-typescript rules, and
applies auto-fixes to the codebase
- Cleans up a bunch of types throughout the codebase, particularly parts
of the code used by ArchiveWebPage
- Changes `ItemIndex#_deleting` from `private` to `protected` so that a
part of AWP that extends it can do so properly
- Makes a bunch of previously-implied [non-null
assertions](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#non-null-assertion-operator-postfix-)
explicit
- Updates `URLResource` and `ItemType` types (and renames `Item` →
`ItemType` to disambiguate from the `Item` class)
- Removes `node-sass` and replaces it with `sass-embedded` for much
quicker installs and compilation
2024-02-06 18:50:12 -08:00
Emma Segal-Grossman a40471128f Fix missed rename, and improve types (#276)
Fixes a missed rename, in `src/item-index.ts`: I'd renamed `coll` to
`item` but missed updating it in the `update` method's
`changedProperties` map.

This PR fixes that, and adds better typing to all of the instances of
`changedProperties` by using
[`PropertyValues<this>`](https://lit.dev/docs/components/lifecycle/#typescript-types-for-changedproperties),
and implementing class properties for missing Lit properties.
2024-01-05 18:32:22 -08:00