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
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
- 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>
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>
- 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>
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!)
- 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>
Closes#252, Closes#250
## Changes
- ReplayWeb.page uses MKDocs for documentation now!
- Requires both
[`mkdocs-macros`](https://mkdocs-macros-plugin.readthedocs.io/en/latest/)
and [`mkdocs-redirects`]
(https://github.com/mkdocs/mkdocs-redirects) plugins to be installed
- Redirects existing docs pages to their new locations under either
`/embedding` or `/user-guide`
- Unused images have been removed
- Adds new ReplayWeb.page branding!
All pages have received copy edits. All references to future (or
previously) planned features have been removed. More major content
changes of note are as follows:
### Supported Locations
- Made into a page, no longer a table. Locations are either supported or
not listed.
### Offline Use
- Removes browser cache section, adds improved PWA install and uninstall
instructions.
- Removes navigation instructions to GitHub's releases section in favour
of a link
### Supported Formats
- Moved to the User Guide homepage
- Updated the format support
### Exploring Archives
- Example links for showcasing features have been moved to their
respective feature documentation section on this page
### Remove Usage, Examples, and Troubleshooting Pages
- Usage content is covered in the user guide index
- Troubleshooting content has been added to a question section on the
getting started page about WARC vs WACZ.
- Examples are now Featured Projects on the docs homepage!
### Build Process
- Removes Jekyll & related site assets.
- Adds new GitHub action for publishing
- Adds a python macro to dynamically load the replayweb.page version from package.json
- Relocates replayweb.page site content under /site (including docs)
- Some assets (favicon, logo) and sw.js/ui.js automatically copied into /site
---------
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
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>
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.
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.
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.
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
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.
* add first pass on playwright integration tests!
- test embed loading via localhost:9990/embed.html as well as cross-domain with embed on localhost:8020/
while RWP + data on localhost:9990/
- add --ignore-optional to most ci runs
- add playwright ci test
- add playwright and playwright-test to dev dependencies
- add 'test-start-embed' to start test harness for localhost:8020/ embed
- add 'test-start-sandbox' to start test harndess for localhost:8030/ sandbox
- add additional tests for loading with sandbox + requiresubdomainiframe, ensure 'requiresubdomainiframe' works, doesn't allow loading directly
- Switches electron src files to typescript with minimum typing required
for build
- Adds webpack-merge for shared typescript build config and jsdoc types
- Minor README changes
---------
Co-authored-by: emma <hi@emma.cafe>
Converts everything to typescript, adding `@ts-expect-error`s where
necessary. Also makes some progress converting elements to use
decorators, but we're not fully there yet — I think it'll make sense to
continue to do that in future PRs, rather than doing it all in one go,
just so that we can keep up with the dev branch.
add ts-lit-plugin and eslint-typescript
disable no-invalid-css rule
fix a bunch of errors raised by eslint and typescript
run prettier & eslint on the remaining files
remove unused imports
split coll-index into index and info components...
and rename "coll" -> "item" for these.
also includes some fixes for previously-undocumented properties used on
non-ts elements.
extract labeled fields into separate component...
and make a few type improvements too
swap custom copy button for shoelace one
rename a few more missed things