1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-14 15:53:28 +01:00

2315 Commits

Author SHA1 Message Date
Tessa Walsh
3c94da04a2
2.7.2 patch release (#787)
* Fix 2.7.1 regressions

* Bump to 2.7.2

* fix redirect-to-exact false:
- check if current loaded timestamp is the same as to-redirected to timestamp, and avoid reload

* additional ui fixes:
- location bar: reload with current timestamp, instead of going to calendar
- ensure calendar popup on replay view is scrollable
- 'Live' mode fixes: don't cache live cdx entry, don't add timestamp when navigating in live mode without timestamp
- remember timeline view toggle on replay
- title: add 'Archived Page: ' prefix to document.title, consistent with old version
- ensure 'Archived Page: ' text is localizable
- ui: change ',' to '|' on capture display

* update CHANGES for 2.7.2

Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
v-2.7.2
2022-12-08 16:35:39 -08:00
Tessa Walsh
2d19b6b18d
Merge 2.7.1 development branch (#785)
* Add locale-dependent handling of first day of week

The Intl.Locale is a proposed standard not yet supported by Firefox so
in Firefox the first day of week will default to Monday (as specified
in ISO-8601).

* Set top frame document title when Vue updates

* Update template guide for 2.7

* Drop Python 3.6 and add 3.10 in test CI

* Allow either JS mimetype in test_add_static

* Add convenience build script for Vue UI

* Add build flag to docker compose example

* Fix Vue app issue with redirect_to_exact: false

Fixes #779

Undated URLs were resulting in a broken calendar and timeline in the
Vue app when redirect_to_exact was set to false. This was due to
TopFrameView using the current datetime if no timestamp was included,
which caused a failed snapshot lookup in the Vue app.

This commit changes the default timestamp in TopFrameView to None and
adds additional logic in the Vue app to use the last snapshot's
timestamp as the default if one is not present to match the snapshot
that pywb loads by default under the same conditions.

* Add filter instead of submitting form when pressing enter in the filtering expression field

* Make filter expressions translatable

* Add missing tooltip strings to vue_loc

* Add changelog

* Bump version to 2.7.1

* Use empty string as default template timestamp

* Bump wombat to 3.3.13

Co-authored-by: Jonas Linde <jonasjlinde@gmail.com>
v-2.7.1
2022-12-07 18:16:18 -08:00
Tessa Walsh
6cc9cdc3ad Remove debugging cdx sources 2022-11-24 16:03:10 -05:00
Tessa Walsh
138e2b284d Add 2.7.0 to changelog v-2.7.0 2022-11-23 14:54:50 -05:00
Tessa Walsh
3b49c2229e Increment version to 2.7.0 2022-11-23 14:54:50 -05:00
Tessa Walsh
fec9cef818 Add note about Vue UI to New Features 2022-11-23 14:54:50 -05:00
Tessa Walsh
d81c2f0303 Add contributing guide 2022-11-23 14:54:44 -05:00
Tessa Walsh
3d8015c444 Update version number in README 2022-11-23 14:54:44 -05:00
Tessa Walsh
91cf74a2a9 Make final pywb 2.7 UI tweaks
- Remove redundant icon title
- Fix display date in TimelineLinear tooltip
- Adjust calendar spacing, add border and shadow
- Remove tooltip scroll
- Auto-size calendar to contents
- Make display date consistent across browsers
- Render calendar for all months regardless of captures
- Fix weekday labels to avoid off-by-one
- Grey out calendar days without captures
2022-11-23 14:53:51 -05:00
Tessa Walsh
373eca641c Default to old search results view for advanced search
Use old results view if matchType or filter params are present in query
string.
2022-11-21 12:46:55 -05:00
Tessa Walsh
2ad7eaee4b Update docs
- Add thorough Vue theming instructions
- Update frameless replay banner info
2022-11-21 12:46:55 -05:00
Tessa Walsh
ca6587caac Make accessibility improvements
- Add URL search bar title and aria-label
- Ensure WCAG AA-acceptable contrast in calendar
2022-11-21 12:46:37 -05:00
Ilya Kreymer
e20fac2c75 head_insert: don't include banner_html, only used for framed replay now
wombat: bump to latest wombat 3.3.7
add new custom_banner to head_insert template for frameless replay
2022-11-21 12:46:28 -05:00
Tessa Walsh
c28941a0b6 Rework Vue banner UI
- Make Vue banner responsive with Bootstrap 4
- Add previous/next year arrows to calendar
- Make navbar background, text color, and button outlines configurable
via config.yaml
- Toggle calendar and timeline separately
- Fix bug preventing title from displaying
- Make app keyboard-navigable
- Fix banner background color configuration
- Comment out vue_navbar_background_hash
- Display linear timeline tooltip centrally on enter
- Improve header styling on small screens
- Add titles to font awesome icons
- Remove old default banner (calendar retained for advanced search
  results)
- Fix TimelineLinear TypeError that broke calendar
- Bump version to 2.7.0b2
- Set Cache-Control header on CDXJ API response to mark returned CDX as
stale after 1 day
- Add commented out UI values to config.yaml to aid users
- Remove timeline and calendar card borders
- Fix issues with snapshot navigation
- Center search bar and align with buttons
- Make Vue app bfcache-ineligible: By adding an empty unload event
listener, we make pages serving the Vue app ineligible for bfcache,
which prevents unexpected behavior when navigating via the browser's
back/forward buttons.
2022-11-21 12:46:09 -05:00
Tessa Walsh
ff7783aa74 Add basic dev docker-compose.yaml 2022-11-21 12:46:09 -05:00
Tessa Walsh
5e2f47a049 Prevent flashing content and unnecessary iframe reload
Connected to https://github.com/webrecorder/pywb/issues/717

When a user navigated to a new URL by clicking on a link in the
replay iframe, the new Vue app was unnecessarily triggering a
reload, causing what looks like a flash of the page content. This
commit modifies the Vue app to only reload the iframe if a user
selected a new snapshot from the calendar or timeline.
2022-11-21 12:46:09 -05:00
Ilya Kreymer
19032e4512 misc vue + i18n fixes:
- make calendar tooltips into real links and clickable and ctrl+clickable
- ensure advanced view uses old ui (not supported in new ui)
- add language popup on frame_insert for vueui
- i18n: consolidate loc strings for vueui into vue_loc.html
- spinner: for replay, only show over banner
- spinner: show after 500ms delay
- i18n: add one more string ('no captures')
- make calendar popup links regular links to support cmd+click
- i18n: implement lang switcher in vue as well (for query and framed_insert), don't include non-vue language switcher in header
2022-11-21 12:46:09 -05:00
Ivan Velev
72cb588936 vueui: i18n support (from @vanecat):
- add localized text to frame_insert.html and query.html (for now) to be passed to vueui
- ensure all vue strings localized
- use variable names in localizabls strings, eg. "view capture on {date}"
- simplified text (no cardinal suffixes, use 24-hourt clock)
2022-11-21 12:46:09 -05:00
Ilya Kreymer
14e464bd1c ui fixes:
- fix static prefix path customization
- fix old ui logo link without locales
2022-11-21 12:46:09 -05:00
Ivan Velev
dc81e78393 vueui: second batch of fixes from @vanecat:
- support for 'cdx-simulator'
- add loading spinner
2022-11-21 12:46:09 -05:00
Ilya Kreymer
6260b226ce ui/templates: fixes based on feedback from @ldko!
templates: add placeholder templates (footer.html, head.html)
templates: allow 'base_html', 'footer_html', 'head_html', 'header_html' to be added via wb-manager 'add-template' cmd
ui: fix logo path, support linking
ui: make url on banner an input field
docs: clarify docs around templates, paths
2022-11-21 12:46:09 -05:00
Lauren Ko
29860bcb24 New UI corrections (#687)
* Fix typos.

* Make ui variable available to collection page
2022-11-21 12:46:09 -05:00
Ilya Kreymer
790487ca15 docs: add new UI docs:
- add ui-overview as UI toc page
- refactor ui-customization to top-level customizations page
- add template-guide for in-depth template reference
- add new-vue-ui page for docs on new ui, with images
- fix adding logo to old ui, add to docs
2022-11-21 12:46:09 -05:00
Ivan Velev
028e7102c0 initial pass on integrating vueui calendar + banner from @vanecat
- use rollup to build vue ui, build at vue/vueui.js
- calendar page renders via both /*/ and /*? queries
- banner support for framed mode only for now
- ensure banner updated in response to inner frame events
- combine cdxquery classes into vue build, expose single entrypoint VueUI.main

- initial set of vueui dev, calendar, banner, calendar hover mode

- ensure embedded mode replay is working

- config: rename ui vars to 'vue_calendar_ui' and 'vue_timeline_banner'

- dependencies: update to wombat 3.3.6

- bump to 2.7.0b0
2022-11-21 12:46:06 -05:00
Ilya Kreymer
1dedc46dce
ci: automated pypi publish on release (#776)
- dependencies: wombat 3.3.11
- ci: pypi publish for pywb
- update CHANGES for 2.6.9 release
v-2.6.9
2022-11-18 17:56:24 -08:00
Tessa Walsh
f96707d039
Add uwsgi virtualenv information (#770) 2022-11-17 10:47:05 -08:00
luandro
ca68cf0da1
add arm64 platform to Docker Hub Action (#775) 2022-11-17 09:26:37 -08:00
Tessa Walsh
815ea92fc2
Rewrite: Support target rewriting, open new windows in top-frame instead (#767)
* Bump wombat to 3.3.9

* Set target attributes to iframe name
2022-10-05 20:55:12 -04:00
Ilya Kreymer
98378a8845
dependency: update to latest wombat (3.3.7) (#763)
eval: switch to new eval rewriting which catches global scope
rxrewriting: remove lookbehind check so that 'return eval(...)' can be rewritten
tests: add additional eval tests

bump to 2.6.9
2022-09-29 11:39:05 -07:00
Ilya Kreymer
6e7a8b1e59 CHANGES: Update changelist for 2.6.8
README: Remove unused appveyor badge (fixes #757)
v-2.6.8
2022-08-31 19:01:35 -07:00
Ilya Kreymer
1fddec216d
Add ir_ modifier (#759)
* rewrite: add 'ir_' mod to support header only url-rewriting with no content rewriting
* tests: add tests for ir_ to test that content is identical to id_, but Location headers are rewritten with ir_ modifier.
2022-08-31 18:49:45 -07:00
Ilya Kreymer
8ef4ff102d
rewrite: tw: improve twitter rewrite to force mp4 for videos in embedded tweets (#761) 2022-08-31 18:48:11 -07:00
Ilya Kreymer
16135d956a
tests fix: add PYWB_NO_VERIFY_SSL env var for tests to avoid failing tests when connecting to external services (#760)
- if variable is set, RemoteIndexSource loading does not verify certs
2022-08-31 18:30:45 -07:00
Ilya Kreymer
1249b41dba
rewrite: detect edge-case where html starts with BOM characters followed followed <!DOCTYPE html> as html (#758)
tests: add test that now results in correct html rewriting
fixes #756
2022-08-31 16:51:41 -07:00
Ilya Kreymer
2ccd8eb2c3
tests run improvements: update from python setup.py test -> tox (#754)
* tests cleanup:
- move test requirements to test_requirements.txt to share between setup.py and tox.ini
- README: update to recommend using 'tox --current-env' for running tests locally
- replaces #741

* test tweaks:
- don't require i18n to import locmanager, instead set flag on load (to avoid breaking tox / pytest)
- don't add werkzeug to test requirements
2022-08-31 16:04:55 -07:00
Ilya Kreymer
f0340c6898 proxy: add COEP header for proxy mode to avoid errors 2022-08-20 22:59:08 -07:00
Ilya Kreymer
c121198183
revisit of redirect optimization: (#753)
- if a revisit is of a redirect (3xx response) and revisit has http headers, return
the http headers with empty payload -- don't bother loading the original record
builds on changes in #751
- cleanup redirect revisit tests from #751
2022-08-20 13:53:16 -07:00
Jonas Linde
0cc912da95
Enable translation for the remaining strings on the search results page (#752)
* Enable translation for the remaining strings on the search results page

* Use toLocaleString() to format timestamps also for search results without matchType
2022-08-18 23:27:22 -07:00
Ilya Kreymer
f190190128
Revisit headers load fix (#751)
* revisit loading fix for revisit records with http headers:
- if revisit record has http headers, always use those headers
- otherwise, continue to use http headers from payload record
- parse headers of http and payload records on initial lookup, to simplify loading
- tests: add test for loading revisit records with different urls, different headers but same payload
- fix for sul-dlss/was-pywb#64
* also bump version to 2.6.8
2022-08-18 23:25:38 -07:00
Laura Wrubel
49393ce16a
Improve replay banner's accessibility (#742)
* Puts banner in header and nav landmark regions
* Adds landmark role of banner to header
2022-08-09 15:25:38 -07:00
Ed Summers
a97ad7ebbe
Ensure CDX status is a string (#739)
If a CDXJ entry has a status that is an int that can cause problems in
multiple places in pywb. This change ensures that int status lines are
converted to str.
2022-08-09 15:04:42 -07:00
Ed Summers
4f1a6303fa
Format error messages (#737)
Currently error messages display on a single line that can be difficult
to scroll. This updates the CSS slightly to allow the message to spread
over multiple lines if needed.
2022-08-09 15:03:00 -07:00
Victor "Vito" Gama
7432299079
Add missing org/image to docker run commands (#733) 2022-08-09 13:53:02 -07:00
Sebastian Gassner
7b00d0627e
describing installation using pip (#726) 2022-08-09 13:51:49 -07:00
Sebastian Nagel
510c9dc9f1
S3 loader to use boto3 built-in credential configuration (#723)
* S3Loader: allow authenticated S3 access using boto3 built-in
configuration methods without explicitly passing credentials, cf.
https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#configuring-credentials

* S3Loader tests: re-enable tests reading from s3://commoncrawl/
in order to test authenticated reads. Tests are skipped
if no AWS credentials are configured.
2022-08-08 17:25:16 -07:00
Jonas Linde
fbed87aa46
Activate field validation when expanding the advanced options (#722) 2022-08-08 15:45:04 -07:00
Jonas Linde
4ac580e401
Add missing translation for the filter-epression field placeholder (#721) 2022-08-08 13:18:44 -07:00
Ed Summers
8e06c2f351
Increase uwsgi_buffer_size for nginx config (#716)
I was playing back a YouTube video and noticed that the playback worked
fine with using uwsgi/pywb directly but failed when using nginx. I think
a very long HTTP Link header was causing nginx to hang up. I increased
the uwsgi_buffer_size to 8k and the problem went away. Maybe this will
save someone else some time if it is increased?

https://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_buffer_size
2022-08-08 13:18:01 -07:00
Tessa Walsh
12a9e32129
Prevent jinja2 from autoescaping markup in metadata (#747)
Connected to https://github.com/webrecorder/pywb/issues/727
2022-08-02 18:41:08 -07:00
Yasar
32e9020fd2
html_rewriter: fixed attribute 'srcset' rewriting (#712)
Co-authored-by: Yasar Kunduz <yasar.kunduz@nationaalarchief.nl>
2022-07-31 17:31:04 -07:00