Commit Graph

907 Commits

Author SHA1 Message Date
Ilya Kreymer
135c97419d version: update to 1.11.4 2024-08-26 12:31:56 -07:00
sua yoo
2a057eddd6
chore: Improve time to load org UI (#2044)
Improves time to first load an org with the following:
- Users user info from login response to set org slug and route user on
log in
- Stores user info in session storage so that it's available on reload
- Stores app settings in local storage until user logs out
- Loads critical org components synchronously
2024-08-26 10:45:10 -07:00
sua yoo
acd3e1252d
feat: Add help shortcuts to app header & footer (#2040)
WIP for https://github.com/webrecorder/browsertrix/issues/2041

<!-- Fixes #issue_number -->

### Changes

- Adds button to open embedded support guide
- Adds link to help forum
- Refactors app bar to look nicer on smaller screens
2024-08-23 18:11:29 -07:00
sua yoo
0e16d526c0
fix: Hide login link on login page (#2039)
- Removes log in link when on log in page
- Fix e2e test, which wasn't actually logging the test user in before
2024-08-21 15:33:24 -07:00
sua yoo
25b1928d44
feat: Enable deleting workflow from list (#2042)
Adds back workflow list menu item to delete workflow if it's never been
run.
2024-08-21 15:33:00 -07:00
sua yoo
2ca9632057
feat: Add additional context around workflow job type options (#2032)
- Updates workflow job type copy and adds additional clarifying text
- Changes "List of URLs" label to "Crawl URL(s)"
- Refactors `NewWorkflowDialog` into tailwind element
2024-08-21 14:03:43 -07:00
sua yoo
3605d07547
fix: Make footer translatable (#2038)
- Wraps footer strings to prepare for localization
- Removes extraneous class names
- Updates copy button tooltip to match bug report field
2024-08-21 14:01:52 -07:00
sua yoo
7208888a1c
chore: remove console log 2024-08-20 17:34:47 -07:00
Emma Segal-Grossman
10640feeef
Add detailed permissions & permission summaries to user invite popup (#2003) 2024-08-20 20:34:29 -04:00
Emma Segal-Grossman
570dc10f2a
Properly pluralize "Pages" in QA, and display skeletons instead of incorrect fallback values (#2026) 2024-08-20 20:33:52 -04:00
sua yoo
351e92ae2f
fix: Prevent browser profile selection overflow (#2029)
- Truncates selected browser profile description and refreshes style
- Order browser profiles by modified date
2024-08-20 12:43:51 -07:00
sua yoo
6ce565b5f7
fix: Use correct job type in crawl settings (#2028)
Fixes https://github.com/webrecorder/browsertrix/issues/2027

### Changes

Fixes crawl settings for archived item not showing the correct fields
based on job type.
2024-08-19 18:10:52 -07:00
sua yoo
4c7f1aa3ca
feat: Clean up settings UI (#2018)
- Renames "Org Settings" -> "Settings"
- Reduces gap between settings panel heading and panel
- Always show "Pending Invites" section and update heading styles to
match panel heading
- Update "Current Plan" and "Usage History" sections to be on the same
hierarchical level under "Billing"
- Refactors `<btrix-org>` to move `isAdmin` and `isCrawler` helpers to
app state
2024-08-19 13:37:41 -07:00
sua yoo
9a7033875b
chore: Refactor home component (#2000)
Resolves https://github.com/webrecorder/browsertrix/issues/1972

---------

Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
2024-08-15 17:16:14 -04:00
sua yoo
1a6892572d
chore: Refactor frontend shared state (#1997)
Refactors custom components to enable shared state accessors
(like `authState`) and helpers (like `api.fetch`.) Schemas are now
defined with [zod](https://zod.dev/?id=basic-usage) which enables
runtime schema validation.

See subtasks for full description of change:

- https://github.com/webrecorder/browsertrix/pull/1979
- https://github.com/webrecorder/browsertrix/pull/1981
- https://github.com/webrecorder/browsertrix/pull/1985
- https://github.com/webrecorder/browsertrix/pull/1986

---------

Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
2024-08-12 17:57:31 -07:00
Ilya Kreymer
3923996aaf
add missing 'Z' for iso-dates until ISO-formatting is fixed (#2008)
Adds missing 'Z' that is added explicitly now, until #1922 is fixed. It
was missing from workflow last modified and billing cancelation dates
2024-08-08 16:19:32 -07:00
Ilya Kreymer
8ff1ad39a7 version: bump to 1.11.3 2024-08-08 15:16:18 -07:00
sua yoo
97eac2b0e2
fix: Redirect /orgs to default path (#2006)
Fixes https://github.com/webrecorder/browsertrix/issues/2005

<!-- Fixes #issue_number -->

### Changes

Redirects `/orgs` to user's default home page.
2024-08-08 15:15:11 -07:00
Emma Segal-Grossman
2b5f964c24
Prevent invalid slugs from causing redirects in org settings (#2004)
Also improves the slug editing experience by partially-slugifying the
value as it's entered.

Previously, submitting a org slug value of ".." or similar would cause
the frontend to redirect to a "page not found" page, with all accessible
links leading to only `/account/settings`. This also causes the backend
to reset the org slug to one generated from the org name on a reload.

---------

Co-authored-by: sua yoo <sua@webrecorder.org>
2024-08-08 14:41:18 -07:00
Ilya Kreymer
ed9038fbdb version: bump to 1.11.2 2024-08-07 12:37:26 -07:00
Ilya Kreymer
5f53db75ee
fix resetting of invalid logins: (#2002)
* Fixes issue in FailedLogin model:
- fix data-model to remove nested 'attempted.attempted'
- migrate existing data to remove nested field

* Also, avoid setting dt_now() in model as that results in fixed date for
all objects:
- update FailedLogin to update 'attempted' date on every attempt
- also update PageNote object to set date in constructor

* Update text for too many logins to make it clear it is set only if its a
valid email

* fixes #2001
2024-08-07 12:36:06 -07:00
sua yoo
0b14be896b
feat: Show usage history in dashboard (#1998)
Following https://github.com/webrecorder/browsertrix/pull/1995, we want
to keep the usage history table on the dashboard for now for video
demos.

### Changes

- Adds usage history table back to org dashboard
- Makes "No usage history" message more apparent
2024-08-06 19:09:34 -07:00
sua yoo
ba1e2ab602
feat: App bar enhancements (#1996)
- Always shows current org name
- Moves org dropdown next to logo
- Reduces logo size when logged in at smaller screen sizes
2024-08-06 17:54:05 -07:00
sua yoo
96e48b001b
feat: Update billing tab with usage & portal URL check (#1995)
- Hides usage table from dashboard if billing is enabled
- Shows usage table in billing settings
- Updates usage table column headings
- Fixes `portalUrl` task running unnecessarily
2024-08-06 16:31:57 -07:00
Ilya Kreymer
7fa2b61b29
Execution time tracking tweaks (#1994)
Tweaks to how execution time is tracked for more accuracy + excluding
waiting states:
- don't update if crawl state is in a 'waiting state' (waiting for
capacity or waiting for org limit)
- rename start states -> waiting states for clarity
- reset lastUpdatedTime if two consecutive updates of non-running state,
to ensure non-running states don't count, but also account for
occasional hiccups -- if only one update detects non-running state,
don't reset
- webhooks: move start webhook to when crawl actually starts for first
time (db lastUpdatedTime is not yet + crawl is running)
- don't set lastUpdatedTime until pods actually running
- set crawljob update interval to every 10 seconds for more accurate
execution time tracking
- frontend: show seconds in 'Execution Time' display
2024-08-06 09:44:44 -07:00
Ilya Kreymer
ec29928b28
Fix QA run downloads as a single WACZ (#1993)
Follow up to #1412, fix QA run downloads as a single (multi) WACZ,
containing other WACZ files from all workers.
2024-08-06 09:44:17 -07:00
Ilya Kreymer
1c153dfd3c
Subscription Update Quotas (#1988)
- Follow-up to #1914, allows SubscriptionUpdate event to also update
quotas.
- Passes current usage info + current billing page URL to portalUrl
request for external app to be able to respond with best portalUrl
- get_origin() moved to utils to be available more generally.
- Updates billing tab to show current plans, switches order of quotas to
list execution time, storage first
2024-08-05 15:59:47 -07:00
Ilya Kreymer
0c29008b7d version: bump to 1.11.1 2024-07-30 11:23:41 -07:00
Ilya Kreymer
4aca107710 version: bump to 1.11.0 2024-07-29 12:52:39 -07:00
Ilya Kreymer
e9aeff1836
add a 'stopped_org_readonly' state for crawls that are running while org is made read-only (#1977)
an org is made read-only while crawls are running:
- treat similar to other stopped_* states, do a graceful stop
- update UI to display "Stopped: Crawling Disabled" for this status
- don't add corresponding skipped status - just skip running crawls if org is read-only
2024-07-29 12:24:40 -07:00
sua yoo
daeb7448f5
feat: Minor improvements to superadmin view (#1971)
Resolves https://github.com/webrecorder/browsertrix/issues/1951

### Changes

- Shows date org was created in superadmin org list
- Visually differentiates unnamed org ID
- Adds "Admin" badge to app header to make current login more apparent
- Fixes logic to show "create org" dialog if there are no orgs in an
instance
- Refactors `btrix-home` to remove unused references to non-superadmin
org list


---------
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
2024-07-25 15:47:40 -07:00
sua yoo
dd6c33a59d
feat: Show details of invalid invite (#1970)
Resolves https://github.com/webrecorder/browsertrix/issues/1912

### Changes

- Show support email, if available, in invalid invite error message
- Separate error message for invite email that doesn't match current
user's
2024-07-25 13:57:02 -07:00
Tessa Walsh
d38abbca7f
Standardize handling of storage and execution time quotas (#1969)
Fixes #1968 

Changes:
- `stopped_quota_reached` and `skipped_quota_reached` migrated to new
values that indicate which quota was reached
- Before crawls are run, the operator checks if storage or exec mins
quotas are reached and if so fails the crawl with the appropriate state
of `skipped_storage_quota_reached` or `skipped_time_quota_reached`
- While crawls are running, the operator checks if the exec mins quota
is reached or if the size of all running crawls will mean the storage
quota is reached once uploaded; if so, the crawl is stopped gracefully
and given `stopped_storage_quota_needed` or `stopped_time_quota_reached`
state as appropriate
- Adds new nightly tests for enforcing storage quota
2024-07-25 12:49:11 -07:00
sua yoo
2c89edcc36
feat: Disable archiving for read-only orgs (#1965)
Resolves https://github.com/webrecorder/browsertrix/issues/1915

### Changes

- Disables buttons to create resources, duplicate resources, run crawls,
and configure browser profiles.
- Updates copy from "read-only" -> "disable archiving"
2024-07-25 12:42:04 -07:00
Tessa Walsh
27ee16d308
Implement downloading archived item + QA runs as multi-WACZ (#1933)
Fixes #1412 

## Changes

### Backend
- Adds `all-crawls`, `crawls`, and `uploads` API endpoints to download
archived item as multi-WACZ
- Download QA runs as multi-WACZ
- Adds backend tests for new endpoints
- Update to new version of stream-zip library which does not require crc-32 to be present for ZIP members,
computes after streaming, fixing invalid crc-32 issues as previously computed crc-32s from crawler may be invalid.

### Frontend

Adds ability to download archived item from:

- Button in archived item detail Files tab
- Archived item details actions menu
- Archived items list menu



---------

Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
Co-authored-by: sua yoo <sua@webrecorder.org>
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2024-07-25 10:28:57 -07:00
Ilya Kreymer
b288cd81cc
fix execution minutes meter using wrong metric (#1967)
The monthly execution minutes meter was using the wrong metric,
`crawlExecSeconds` instead of `monthlyExecSeconds`.
Since the meter is showing minutes used out of the monthly quota, it
should be using `monthlyExecSeconds`.

This is a quick fix, however, this system may need another pass at some
point.

---------
Co-authored-by: sua yoo <sua@suayoo.com>
2024-07-24 09:14:15 -07:00
sua yoo
24c8963dba
chore: Rename upload dialog (#1966)
Resolves https://github.com/webrecorder/browsertrix/issues/1961

Renames "Upload Archive" dialog to reference WACZ.

---------

Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
2024-07-23 23:02:05 -07:00
sua yoo
08147ec77d
fix: Update org status banner on quota reached (#1956)
Fixes https://github.com/webrecorder/browsertrix/issues/1954

### Changes

- Refactors app state to include org data
- Fixes banner not showing if storage or execution minutes is exceeded
after page load
- Disables closing banners
- Refreshes org when tab changes

---------
Co-authored-by: emma <hi@emma.cafe>
2024-07-23 22:55:45 -07:00
sua yoo
8c4e481bd3
feat: Improve UX when user doesn't belong to any orgs (#1953)
Directs user that doesn't belong to any orgs to account settings page,
with banner.

Also contains some minor out-of-scope changes:
- Refactors `isAdmin` key to `isSuperAdmin` for more legibility on
whether current user is superadmin or regular user without orgs
- Adds "cancel" button to change password form
2024-07-23 19:51:28 -04:00
Tessa Walsh
a02f7a6826
Ensure lexical sort for org names (#1958)
Fixes #1955 

Orgs list endpoint sorting now works as follows:
- Default org is always sorted first
- Name sorting now works on a lowercased version of the org names to
ensure lexical sorting

The lodash `sortBy` resorting of orgs in the "All Organizations"
dropdown list in the nav bar has also been removed so that the backend
sorting is applied instead.

Tests have been updated accordingly.
2024-07-23 13:13:04 -07:00
Ilya Kreymer
b1ccdc4d16
OpenAPI Metadata for API Endpoints (#1941)
- Updates the `/docs` and `/redoc` API endpoints to have better metadata,
including using Browsertrix favicon and our logo for the `/redoc` endpoint.
- add new logo file 'docs-logo.svg' to root

Based on info at:
https://fastapi.tiangolo.com/how-to/extending-openapi/
https://fastapi.tiangolo.com/tutorial/metadata/

---------
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
2024-07-18 11:11:38 -07:00
sua yoo
f7a675ea2d
feat: Show single org status alert banner (#1937)
Resolves #1876

### Changes

Displays single banner for critical org alerts.

---------
Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2024-07-17 18:50:53 -07:00
sua yoo
42b4768b59
feat: Billing UI fast-follows (#1936)
### Changes
- Updates customer portal link label
- Opens billing portal in the same tab
- Shows separate cancel date
- Makes payment failed appear as error
- Fixes crawl time quota
2024-07-17 17:13:28 -07:00
Ilya Kreymer
27059c91a5 version: bump to 1.11.0-beta.1 2024-07-17 10:06:49 -07:00
Emma Segal-Grossman
224b011070
Small UI fixes (#1934)
Fixes a few things that have been bugging me:

- Overflow buttons in list view now (mostly) take up the their full cell
area, instead of there being a couple pixels around the button where
clicking would do nothing or cause navigation

  - | before | after |
    | --- | --- |
| <img width="238" alt="Screenshot 2024-07-16 at 3 35 25 PM"
src="https://github.com/user-attachments/assets/afbda6d6-703b-4ed8-96be-a9c37660430d">
| <img width="236" alt="Screenshot 2024-07-16 at 3 35 02 PM"
src="https://github.com/user-attachments/assets/417a326a-08d2-42b2-85c3-fa007ea3bff8">
|

- Changes the class that `tab-list` uses internally so that it doesn't
conflict with Tailwind's `container` class, which prevents the tab
content from being limited at the default Tailwind container width
- Adds a couple of Tailwind plugins for styling CSS parts
(`part-[...]:`) and for arbitrary attributes (`attr-[...]:`)
2024-07-16 17:01:55 -04:00
sua yoo
79ff806352
update org url errors 2024-07-16 12:59:54 -07:00
sua yoo
8577b5bd93
update superadmin error 2024-07-16 12:59:54 -07:00
sua yoo
38a877fa8d
Update frontend/src/utils/form.ts
Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
2024-07-16 12:57:12 -07:00
sua yoo
a234a36057
standarize slugify 2024-07-15 12:06:43 -07:00
sua yoo
bafc96ac94
check org slug 2024-07-15 12:05:19 -07:00
sua yoo
adea46640e
standardize max length 2024-07-15 11:40:15 -07:00
sua yoo
6f031f1059
show correct field when validating 2024-07-15 11:02:10 -07:00
sua yoo
bdd279c4f8
show validation message 2024-07-15 10:36:16 -07:00
Tessa Walsh
a546fb6fe0
Improve handling of duplicate org name/slug (#1917)
Initial implementation of #1892 

- Modifies the backend to return `duplicate_org_name` or
`duplicate_org_slug` as appropriate on a pymongo `DuplicateKeyError`
- Updates frontend to handle `duplicate_org_name`, `duplicate_org_slug`,
and `invalid_slug` error details
- Update errors to be more consistent, also return `duplicate_org_subscription.subId` for duplicate subscription instead of the more generic `already_exists`
---------
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2024-07-10 19:24:50 -07:00
sua yoo
d4334d42bc
feat: Enable self-service user access to billing portal (#1908)
Resolves https://github.com/webrecorder/browsertrix/issues/1875
Follows https://github.com/webrecorder/browsertrix/pull/1914

### Changes

- When billing is enabled, adds billing tab to org settings that
displays billing information if applicable
- Handles external link to manage plan
- Refactors org quota type to always be present
- Refactors org settings into `TailwindComponent`
2024-07-10 17:11:01 -07:00
sua yoo
020c9dc1b8
feat: Allow superadmins to delete org (#1788)
Resolves https://github.com/webrecorder/browsertrix/issues/1453

<!-- Fixes #issue_number -->

### Changes

Allows super-admins to delete an org via UI
2024-07-10 17:02:00 -07:00
sua yoo
4207cc0116
chore: fix frontend test dependencies 2024-07-08 17:18:16 -07:00
sua yoo
c97900ec2b
Merge branch 'main' into frontend-org-manage-readonly 2024-07-08 11:20:30 -07:00
sua yoo
6cd5295a31
update copy 2024-07-08 11:16:22 -07:00
sua yoo
dd63c4d980
Update frontend/src/components/orgs-list.ts
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
2024-07-08 11:05:25 -07:00
Tessa Walsh
f1274a6ffc
Add counts for HTML pages, files, and errors to QA tab (#1913)
Fixes #1859 

Adds a section on the QA page showing the breakdown of HTML Pages, non-html files captured as pages, and failed pages in the crawl
2024-07-03 14:23:34 -07:00
sua yoo
aa961493fd
test: Remove temporary commonjs module mocks (#1910)
No issue created, but noticed issue here
ed0d489cda

### Changes

- Removes unused node module mocks and use commonjs plugin to import
modules in tests
- Fixes org form test after removing temporary stub
2024-07-03 16:45:56 -04:00
Noah
9088101ef6
feat: support both ipv6 and ipv4 nginx resolver
updates the script to generate the nginx resolver to support both ipv6 and ipv4
2024-07-03 12:00:16 -07:00
Tessa Walsh
497cfdc561
Merge branch 'main' into frontend-org-manage-readonly 2024-07-03 11:15:47 -04:00
Tessa Walsh
d3fb33a78a Add and apply backend sorting for org list
The default org will always be sorted first, regardless of sort options.
Orgs after the first will be sorted by name ascending by default.
Sorting currently supported on name, slug, and readOnly.
2024-07-03 11:01:01 -04:00
Tessa Walsh
f076e7d9e3
Add superuser API endpoints to export and import org data (#1394)
Fixes #890 

This PR introduces new streaming superuser-only API endpoints to export
and import database information for an organization. New Adminstrator
deployment documentation on how to manage the process and copy files
between S3 buckets as needed is also included.

---------

Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
2024-07-02 17:14:34 -04:00
sua yoo
ed0d489cda
fix tests 2024-07-01 23:03:47 -07:00
sua yoo
04e3b2f163
make read only 2024-07-01 22:12:44 -07:00
sua yoo
350fb06d36
update layout 2024-07-01 20:57:48 -07:00
sua yoo
e7028ce64a
show quota status 2024-07-01 14:09:58 -07:00
sua yoo
ad2902ee2f
show additional data 2024-07-01 14:09:58 -07:00
sua yoo
35469915a8
refactor org list 2024-07-01 14:09:58 -07:00
sua yoo
2664fd0f0e
sort orgs alphabetically 2024-07-01 14:09:58 -07:00
sua yoo
e7df805b51
check confirmation string 2024-07-01 14:09:57 -07:00
sua yoo
13b6a5b15f
add dialog 2024-07-01 14:09:57 -07:00
sua yoo
ebb9dc826a
fix dialog 2024-07-01 14:09:57 -07:00
Tessa Walsh
8a904c9031
feat: Rename org when accepting org invite for first admin (#1870)
Resolves https://github.com/webrecorder/browsertrix/issues/1874

Support for new two-part sign up flow if first admin user is added to org
- If new user, user registers first, then is able to change the org name / slug on following screen
- If existing user, user accepts invite, then is able to change the org name / slug on following screen
- After confirming org slug name, user is taken to dashboard, or error is shown if org name or slug already taken.
- If org name == org id, org name and slug is automatically set to `{Your Name}'s Archive` when first user is registered / accepts invite
- Email templates updated to better reflect new / existing users and not show org name if it is 'unset' (org name == org id internally)
- tests: frontend unit testing for accept + invite screens.

---------
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
Co-authored-by: sua yoo <sua@suayoo.com>
Co-authored-by: sua yoo <sua@webrecorder.org>
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
2024-06-27 16:08:31 -07:00
Emma Segal-Grossman
a7382ebb98
Use internal rounded bar in <btrix-meter> for QA analysis meters (#1869)
Closes #1851 

This changes how we use the `<btrix-meter>` component: previously, we
didn't set a `max` value on it, so it was drawing its internal (rounded)
bar at 100% of the meter width, and then drawing the
`<btrix-meter-bar>`s inside that 100% width bar. This changes that, and
instead it now does the following:

- Draws the internal rounded bar to the width of the proportion of their
counts to the total page count;
- Adjusts the `<btrix-meter-bar>`s to be proportional to the completed
page count rather than the total page count
- Uses the `"available"` slot in `<btrix-meter>` to draw the remaining
"No data" bar & tooltip in the remaining space outside of the internal
rounded bar

This also includes a couple unrelated but adjacent changes:

- Changes the page count text to say "Analysis starting" when the
analysis run is starting, because there's no meaningful page count at
that point.
- Uses the pending state when the total page count is falsy (`undefined`
or `0`), rather than just `undefined`
2024-06-21 22:40:56 -07:00
Ilya Kreymer
553e2e352b
Merge branch 'main' into 1.10.2-release 2024-06-12 23:59:56 -07:00
Henry Wilkinson
dc9069d1bf
Improves accessibility for QA features (#1863)
- Switches from spans with classes to `ins` and `del` tags for text
comparison
- Adds `aria-label` attributes for screen readers. Text comparison is
accessible now! 🎉
- I kept the strikethrough text on the `del` tag but can remove? Only
visible on hover.
- Removes autofocus on the delete analysis run cancel button
- Adds `aria-label` attribute for the heuristic nav bar to describe the
context of the content users will be seeing on each page.
2024-06-12 21:32:43 -04:00
sua yoo
f8cde4bd76
fix: Show correct max depth in settings (#1858)
Fixes https://github.com/webrecorder/browsertrix/issues/1626
2024-06-12 15:05:01 -05:00
Tessa Walsh
8b0d1432af
Show QA meter while analysis is running (#1854)
Fixes #1846 

- Ensure meter auto-updates as new stats are ready
- Switch meter to new QA run when new analysis run is started
- Remove Files from QA meter (files and errors will be reported separately)

Co-authored-by: emma <hi@emma.cafe>
Co-authored-by: sua yoo <sua@webrecorder.org>
2024-06-12 12:32:01 -04:00
sua yoo
9d69001c23
fix: Prevent ReplayWeb.Page shoelace components from impacting browsertrix (#1861)
Resolves https://github.com/webrecorder/browsertrix/issues/1836
Related to https://github.com/webrecorder/replayweb.page/pull/329

<!-- Fixes #issue_number -->

### Changes

Loads `replay/ui.js` after the browsertrix-app component is defined to
prevent browsertrix from using buttons defined by replayweb.page
shoelace imports. This was the most evident in button group styles not
being applied.
2024-06-12 09:20:49 -07:00
Henry Wilkinson
3de2e486b1
Reorder sections to match workflow creator (#1862) 2024-06-12 11:46:15 -04:00
sua yoo
d501fb3fe7
fix: Correct progress ring for analysis run in Chrome (#1860)
Switches `sl-progress-ring` and `sl-icon` to inherit font size from
table cell for consistent sizing as base size, while also fixing
`var(--font-size-base)` not being available when progress ring size is
first calculated.

Fixes #1835
2024-06-12 09:51:16 -05:00
Ilya Kreymer
1ab6ec325b version: bump to 1.10.2 2024-06-11 16:28:40 -07:00
Tessa Walsh
a03bc06473
Add button to QA Latest Crawl to Watch tab (#1856) 2024-06-10 12:46:04 -04:00
Tessa Walsh
4edc05d503
Use standard firstSeed/seedCount fallback for workflows with no name in profile details (#1852)
Fixes #1833 

- Add firstSeed and seedCount to workflow information in profile detail
API endpoint (tests updated accordingly), update name of model used for
limited workflow information to be more accurate
- Fix name display in Crawl Workflows list at bottom of Profile detail
page to be consistent with rest of application

---------

Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
2024-06-06 14:28:19 -04:00
Tessa Walsh
a85f9496b0
Include number of Identical Files in QA stats and meter (#1848)
This PR adds Identical Files to the QA Page Match Analysis meter bars.
To do this, the backend calculates the number of non-HTML pages once and
includes it under the key `Files` in each of the `screenshotMatch` and
`textMatch` QA stats return arrays.

The backend additionally removes the file count from "No Data" to
prevent these from being counted twice.

---------

Co-authored-by: emma <hi@emma.cafe>
2024-06-06 13:15:19 -04:00
Ilya Kreymer
e3ee63f9b0 version: bump to 1.11.0-beta.0 2024-06-04 13:37:44 -07:00
sua yoo
4d4c8a04d4
feat: User-sort browser profiles list (#1839)
Resolves https://github.com/webrecorder/browsertrix/issues/1409

### Changes

- Enables clicking on Browser Profiles column header to sort the table, including by starting URL
- More consistent column widths throughout app

---------

Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
Co-authored-by: emma <hi@emma.cafe>
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
2024-06-04 13:57:03 -04:00
Henry Wilkinson
c2ce96c057
Move copy-field label outside of field (#1845)
Moves `copy-field` label outside of the div that contains the content
2024-05-31 20:24:09 -04:00
Ilya Kreymer
b432d226bd
Profile UX tweaks + sync between new and edit workflows (#1840)
Follow up to #1815 

- Improved detection / responsiveness to unavailable browser
- Disable Save buttons when browser disconnected / unavailable
- Only add unload handler when browser is available
- Consistency between new and edit views: new profile view also has
cancel button with confirmation
- Don't show cancel confirmation if browser is already unavailable. 

Various text tweaks for consistency / accuracy:
- Save New Profile... to indicate new profile will be saved after dialog
- Load new browser to indicate new browser will be created
- Mention connection to browser is lost in disconnected message.

Also: migrated to LiteElement -> TailwindElement for browser-profiles-new

-------
Co-authored-by: emma <hi@emma.cafe>
2024-05-30 11:19:36 -07:00
sua yoo
aa6429049e
Display name of user who last updated browser profile (#1834)
- Shows browser profile last modified or created by name, if available
- Moves backed-up status to browser profile subsection header
- Moves "Last Updated" column to last and displays user name on hover,
to match archived items list view
- Updates browser profile docs
2024-05-29 13:40:56 -07:00
sua yoo
523ad68880
Browser profile list and detail minor UX improvements (#1822)
- Paginates browser profile list view
- Moves back-up status icon to list view
- Display last updated date if available (fallback to created date)
- Adds max length validation to description
- Better handle description and crawl workflow list
2024-05-29 12:40:19 -07:00
Emma Segal-Grossman
6a94c64fa2
ensure loader fills image swiper, and only display loader when replay data is nullish, not when it's loaded but there's no image data (#1819)
Closes #1818 

- Refactors image renderers, and changes the condition for which the
loading indicator is displayed from "`<data>.blobUrl` exists and has a
truthey value" to "`<data>` is not nullish"
- Adds an additional class config to the shared QA loading indicator,
and uses it in the image slider view to add a background and aspect
ratio to the loading indicator's container so that it takes up the space
it should and has an opaque background

| Before | After |
| --- | --- |
| <img width="813" alt="Screenshot 2024-05-22 at 5 17 14 PM"
src="https://github.com/webrecorder/browsertrix/assets/5727389/fb8a3a83-a0c8-46c1-b59b-a59adff2a175">
| <img width="813" alt="Screenshot 2024-05-22 at 5 17 31 PM"
src="https://github.com/webrecorder/browsertrix/assets/5727389/6fe5d04a-ffa9-4fc3-bc3b-bdb9b7b30948">
|
2024-05-28 14:02:49 -04:00
sua yoo
8faf0adb55
UX improvements to browser profile editing & creating view (#1815)
Resolves https://github.com/webrecorder/browsertrix/issues/438

<!-- Fixes #issue_number -->

### Changes
- Layout and design pass on profile detail view to better match other
detail views
- Ensures profile save buttons are always visible when creating or
editing a profile
- Handle temporarily disconnected browser pings
- Enable recreating browser after it expires
- Show confirmation dialog when attempting to navigate away from active
browser
- Tweak copy referencing profiles
- Refactors `profile-browser` into `TailwindComponent`

### Follow-ups

UX improvements to the browser profile detail layout and list view will
be handled in https://github.com/webrecorder/browsertrix/issues/1816

---------
Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
2024-05-27 16:57:33 -07:00
Ilya Kreymer
4b6dd97c11 version: bump to 1.10.1 2024-05-23 22:24:58 -07:00
Emma Segal-Grossman
2c9ead718f
Misc UI fixes (primarily buttons) (#1814)
Closes #1813 

Before:


https://github.com/webrecorder/browsertrix/assets/5727389/b843f33a-6323-4a57-bc25-030582478a14

After:


https://github.com/webrecorder/browsertrix/assets/5727389/579200a0-cef2-4f49-8969-6fee1dfd07f5

<img width="156" alt="Screenshot 2024-05-21 at 7 25 42 PM"
src="https://github.com/webrecorder/browsertrix/assets/5727389/8235b8d2-5184-4d14-a4e7-b5969025f4f5">
2024-05-22 15:55:52 -04:00
sua yoo
0d53771a81
Fix editing browser profile metadata (#1812)
- Fixes browser profile metadata form submission
- Fixes rendering of browser profile description in list view
- Changes label to "metadata" for consistency with other features
2024-05-21 16:34:17 -07:00
Emma Segal-Grossman
040d1b70d4
Custom button cleanup & toolbar button styles (#1794)
Closes https://github.com/webrecorder/browsertrix/issues/1791



https://github.com/webrecorder/browsertrix/assets/5727389/54a4d9a2-9e68-4cbd-9cef-8a73a6106043

| Screenshots |
| --- |
| <img width="145" alt="Screenshot 2024-05-08 at 6 13 53 PM"
src="https://github.com/webrecorder/browsertrix/assets/5727389/35efd4b5-2a59-4fd2-8a62-904eedad98f9">
|
2024-05-21 13:28:41 -04:00
Ilya Kreymer
e853b62401 version: update to 1.10.0! 2024-05-20 19:30:22 -07:00
sua yoo
5c3b24fbf9
Fix newly created org missing from user's org list (#1799)
Resolves https://github.com/webrecorder/browsertrix/issues/1398

### Changes
- Updates org list in user info state after an org is created
- Minor refactor to add `btrix` prefix to custom `update-user-info`
event and replace unnecessary `defaultOrg` property
2024-05-20 19:27:19 -07:00
sua yoo
c5034e882d
Upgrade Shoelace for UI fixes (#1806)
Fixes https://github.com/webrecorder/browsertrix/issues/1802

<!-- Fixes #issue_number -->

### Changes

- Upgrades Shoelace to 2.15.0 for UI fixes including #1802 (See
https://github.com/shoelace-style/shoelace/blob/v2.15.0/docs/pages/resources/changelog.md)
- Refactors custom components that extend Shoelace components so that
shared shoelace `componentStyles` are included properly
2024-05-16 11:36:08 -07:00
sua yoo
24b20215d0
Allow superadmins to set role when inviting user (#1801)
- Adds user role select to superadmin dashboard
- Requires org selection (unless there's only one org) to prevent
accidental crawler invites to default testing org
- Shows link to org members after invite, retaining form for quick
re-invite
- Refactor `invite-form` into `TailwindComponent`
2024-05-15 19:47:23 -07:00
sua yoo
3b2e382ba0
Reorganize frontend build files (#1803)
Refactors config files so that `/config` can be included in Docker build.
2024-05-15 19:46:52 -07:00
sua yoo
0479489bd8
Allow users to configure offset when viewing crawl queued URLs (#1581) 2024-05-15 14:42:00 -07:00
Ilya Kreymer
94d57b98ce version bump to 1.10.0-beta.7 2024-05-15 11:30:05 -07:00
Vinzenz Sinapius
3e24b8dbb5
Add plugins directory to frontend Dockerfile (#1798) 2024-05-15 11:22:54 -04:00
Emma Segal-Grossman
d6f2fee279
Allow QA view to be larger than viewport height if necessary (#1790)
Closes #1789

### Changes
- Converts stylesheet in js to css now that it doesn't use any runtime
values
- Removes fixed height on QA container, and instead sets a min height
- Applies `contain: size` to page list & tab content so they don't cause
the QA container to stretch
- Also updates instances of `h-{n} w-{n}` to `size-{n}`
- Removes leftover outlines on text and resource comparison areas from
early QA prototyping
2024-05-14 17:26:06 -04:00
Emma Segal-Grossman
ed189efef4
Fix needing to go back twice in archived item detail initial load (#1796)
Tested locally
2024-05-14 17:25:50 -04:00
Emma Segal-Grossman
76cd19d126
[Bug] Collection detail: only update dialog state on close event if close event originates from dialog (#1793)
Closes https://github.com/webrecorder/browsertrix/issues/1553

## Changes
Adds a check on `sl-hide` events to ensure that only the events
originating from the elements we want to listen to are acted on
2024-05-14 15:21:10 -04:00
sua yoo
8b7ec5423d
QA review Replay embed improvements (#1775)
### Changes

- Adds button to refresh current QA review Replay
- Shows loading indicator when Replay window is loading
- Prevents clicking links within Replay
- Fixes document scrollbar gutter
- Adds scroll snap to QA review

Resolves #1758
2024-05-10 11:30:21 +02:00
sua yoo
76329671a8
Fix browser navigation button usage in QA review (#1776) 2024-05-07 19:42:43 -07:00
Henry Wilkinson
06b512bb84
Auto-load seed url when replaying seeded crawls (#1786)
Closes #1787

- Crawls with only one seed will load viewing that seed URL
- URL list crawls with >1 URLs will continue to load the pages list as no
ReplayWeb.page enbed URL has been defined

Co-authored-by: sua yoo <sua@webrecorder.org>
2024-05-07 14:03:14 -04:00
Henry Wilkinson
fe583c0f50
Add emails to the org settings tables (#1785)
Fixes #1687

- Adds an email field to the table at all times
- Converts the trash icon to `sl-icon-button` in the pending table,
makes it red on hover
2024-05-06 19:01:23 -04:00
Henry Wilkinson
cf1592a809
Fix truncation for long workflow / item names (#1773)
Fixes #1771

### Changes

- Previously these would either get cut off or overflow, now they get
truncated!
- Titles also have a tooltip now

### Screenshots (after, see issue for before)

<img width="780" alt="Screenshot 2024-05-02 at 1 25 00 PM"
src="https://github.com/webrecorder/browsertrix/assets/5672810/337f90e4-c3b2-4adf-b63e-fd4fdf85d593">

<img width="1184" alt="Screenshot 2024-05-02 at 1 58 21 PM"
src="https://github.com/webrecorder/browsertrix/assets/5672810/a0e5111a-ffd4-4d03-8833-cc1831d28e60">

**Before**
<img width="655" alt="Screenshot 2024-05-02 at 1 59 26 PM"
src="https://github.com/webrecorder/browsertrix/assets/5672810/a69d3359-3932-4183-9563-2d49b4082990">

**After**
<img width="489" alt="Screenshot 2024-05-02 at 2 46 49 PM"
src="https://github.com/webrecorder/browsertrix/assets/5672810/c1ead7ae-0c26-44e6-916e-df7a398f97df">

### Caveats
- Doesn't replace the in-page dialog.  Added a TODO note.

---------

Co-authored-by: emma <hi@emma.cafe>
2024-05-03 13:48:18 -04:00
Henry Wilkinson
93c35ee2ee
Update dash and slash icons (#1783)
Fixes #1782 

- Dash icons are now used to convey status exclusively
- Slash icons are now used to convey no data states
- Updates status icons to filled in the docs (also required for QA
docs!)
2024-05-03 12:52:07 -04:00
sua yoo
e7dbf914a3
QA review tooltip + comment improvements (#1779)
Resolves https://github.com/webrecorder/browsertrix/issues/1761

<!-- Fixes #issue_number -->

### Changes

- Switches QA review page chip tooltip colors to dark text on light
background
- Shows newest comment when hovering over comment cell in QA tab page
list to match tooltip in QA review page list
- Validates textarea max entry for description and comments
2024-05-02 01:30:24 +02:00
sua yoo
fef2b43072
Fix QA tab loading state (#1772)
- Prevents misleading "no text" message shown when switching tabs
- Reset data and show loading indicator when switching pages
- Fix replay tab height and visually differentiates empty replay window
from empty tab
- Refactors console.logs to debugs
2024-04-30 18:16:12 -07:00
Emma Segal-Grossman
c5b69f814d
Frontend QA dual slider view doesn't correctly show missing images (#1770)
Also fixes overflow (641309f) & pluralization (1b24abd) issues
2024-04-30 16:33:32 -07:00
Ilya Kreymer
e022994f4e version: update to 1.10.0-beta.6 2024-04-30 20:34:11 +02:00
sua yoo
270e056c34
Fix add to collection dropdown (#1766)
Fixes https://github.com/webrecorder/browsertrix/issues/1638

### Changes
- Fixes collection selection during upload and in workflow settings
- Refactors `btrix-collections-add` to `TailwindComponent` with lit
`Task` usage

### Manual testing

1. Log in as crawler
2. Go to "Archived Items"
3. Click "Upload WACZ"
4. Select wacz file to upload
5. Search for collection in "Add to Collection". Verify you're able to
select a search result
6. Save. Verify collection saves as expected.
7. Go to "Crawling"
8. Create a new workflow
9. Go to "Metadata"
10. Repeat 5-6.
2024-04-30 14:32:18 -04:00
sua yoo
fe65ccf579
Fix misleading upload error notification (#1768)
Fixes https://github.com/webrecorder/browsertrix/issues/1767
2024-04-30 20:03:58 +02:00
sua yoo
37cb297d01
Handle null replicas in browser profile (#1765)
Fixes https://github.com/webrecorder/browsertrix/issues/1764

### Changes

- Handles profile `resource.replicas` being null
- Adds loading indicator when browser profile list is loading
2024-04-30 19:47:40 +02:00
Ilya Kreymer
bf4fc93d5a
Fix 'Review Crawl' button disabled state. (#1751)
Disable the 'Review Crawl' button only when there are no finished QA
Runs:
- track last finished qa run 'lastFinishedQARunId'
- track if qa run is running via 'isQAActive'
- only add tooltip / disabled state when there are no finished qa runs

Also, only add href when not disabled, to avoid clickable link with
disabled button

---------

Co-authored-by: emma <hi@emma.cafe>
2024-04-29 14:02:10 -04:00
Natanael Arndt
a1de72c2ba
Update index.ts (#1749)
Fix typo in Source Code GitHub link
2024-04-25 17:06:14 +02:00
Ilya Kreymer
a3911f6a8a version: bump to 1.10.0-beta.5 2024-04-25 09:00:54 +02:00
Ilya Kreymer
a09f565ce5 version: bump to 1.10.0-beta.4 2024-04-24 16:53:39 +02:00
Ilya Kreymer
b061a39d5f
Handle registration when user already exists (#1744)
Fixes https://github.com/webrecorder/browsertrix/issues/1743

On the backend, support adding user to new org and improved error
messaging:
- if user exists is not part of the org to be added to, add user to the
registration org, return 201
- if user is already part of the org, return 400 with
'user_already_is_org_member' error
- if user is not being added to a new org but already exists, return
'user_already_exists'

frontend:
- if user user same password, they will just be logged in and added to
registration org (same as before)
- if user uses wrong password, show alert message
- handle both user_already_is_org_member and user_already_registered
with alert message and link to log-in page.

note: this means existing user is added to the registration org even if
they provide wrong password, but they won't be able
to login until they use correct password/reset/etc...
2024-04-24 16:40:25 +02:00
Ilya Kreymer
f89027ac89 version: 1.10.0-beta.3 2024-04-24 15:45:17 +02:00
sua yoo
eeab64a0d1
Redirect if org with slug doesn't exist (#1740)
Resolves https://github.com/webrecorder/browsertrix/issues/1739

Redirect to first user's first org if an org with current slug doesn't
exist.
2024-04-24 04:50:55 -04:00
Ilya Kreymer
6232103e60
quickfix: nginx: have nginx serve the fallback index.html with a 200 instead of a 404 (#1742)
Nginx serves index.html for all pages, but with a 404. This changes it
to instead return a 200.
2024-04-24 07:09:08 +02:00
Emma Segal-Grossman
d446857cea
Quick fix: hoist tooltips in archived item list (#1738)
Now that we're using a bunch of tooltips, I found when there are very
few items listed the tooltips sometimes get squished in weird ways —
this fixes that.
2024-04-23 19:16:58 -04:00
Ilya Kreymer
41655ef829 version: bump to 1.10.0-beta.2 2024-04-23 23:19:16 +02:00
sua yoo
7ac06608b2
Fix archived item status icon size + minor review UI updates (#1734)
Related to https://github.com/webrecorder/browsertrix/issues/1477, minor
UI tweaks as fast follow:

- Makes archived item status icons all the same size
- Increases hover hit target of archived item cells
- Reduces top padding of QA review page
- Adds "Back" button to QA review page to match all other pages
- Updates percentage formatting of tab labels to match pages
2024-04-23 17:08:24 -04:00
sua yoo
1915274e26
Fix QA review comments (#1723)
Fixes https://github.com/webrecorder/browsertrix/issues/1710

Fixes date and deletion for newly added comments.
2024-04-23 16:31:52 -04:00
sua yoo
9836e750c8
Hide QA UI from users without crawler role (#1733)
Resolves https://github.com/webrecorder/browsertrix/issues/1732

- Hides QA tab and QA review page from users with viewer role
- Fixes empty menu button rendering for viewers on archived item detail
page
2024-04-23 16:01:23 -04:00
sua yoo
1f4440db64
Poll archived items list (#1730)
- Refreshes archived items page every 5 seconds to get in progress QA
runs.
- Refactors archived items to use `TailwindComponent` and lit tasks
- Adds back all columns to upload list to prevent layout shift (see
follow-ups)
- Fixes list not updating after search value is selected.
2024-04-23 12:53:55 -07:00
sua yoo
cb9012a6df
Fix QA navigation (#1731)
- Resolves https://github.com/webrecorder/browsertrix/issues/1705
- Resolves https://github.com/webrecorder/browsertrix/issues/1477

Changes:

- Takes user back to archived item QA tab after submitting review.
- Prevents clicking on page in QA tab when there's no analysis runs.
- Disables analysis-related sort options in QA tab when there's no
analysis runs.
- Handles pages without a title in QA tab.
- Adds initial loading state to QA review page list.
2024-04-23 15:45:06 -04:00
sua yoo
dde1175bd0
Add QA page analysis chart (#1725) 2024-04-23 10:37:22 -04:00
Emma Segal-Grossman
1f59c0b452
add best text & screenshot match sorting options (#1726) 2024-04-22 20:53:17 -04:00
Emma Segal-Grossman
7871d30ba1
QA UI: Copy updates & beta tag (#1722)
Closes #1718

- Adds beta badge & icon components
- Changes the capitalization of "analysis run" to lowercase in sentences
- Changes instances of "in Replay" and "From Replay" to "During
Analysis"

| Screenshots |
| --- |
| <img width="400" alt="Screenshot 2024-04-22 at 6 09 28 PM"
src="https://github.com/webrecorder/browsertrix/assets/5727389/4822e361-c82c-4349-957a-a7a9f15dbc7a">
|
| <img width="254" alt="Screenshot 2024-04-22 at 6 09 44 PM"
src="https://github.com/webrecorder/browsertrix/assets/5727389/01a1457f-e00c-46ba-8af5-66b702344b7a">
|
| <img width="313" alt="Screenshot 2024-04-22 at 6 10 04 PM"
src="https://github.com/webrecorder/browsertrix/assets/5727389/bd38e2f7-28ea-49e9-b856-cc7ade6ae618">
|
| <img width="597" alt="image"
src="https://github.com/webrecorder/browsertrix/assets/5727389/ac95c2a3-ba67-42b3-a33d-c0b61e2ba6f7">
|
2024-04-22 20:03:55 -04:00
Emma Segal-Grossman
7710be0f6e
More Frontend QA Polish Changes (#1709)
Sort of relevant to #1696

- Improves a number of layout elements at smaller viewport sizes
(specifically, letting button groups wrap onto next lines & ensure
titles can't shrink to 0 width)
- Adds "No page title" to places where there'd normally be a page title
but isn't
- Applies grid styling to page list area to fix overflow issues 
- When selecting or loading with a page selected that's farther down on
the page list, the top of the page header could be scrolled away from,
and there'd be no way to scroll back because the area had `overflow:
hidden` applied
- Adds default width and height to image comparer element, so that it
displays correctly when images haven't loaded and doesn't change layout
when images load

---------

Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
2024-04-22 20:02:07 -04:00
Emma Segal-Grossman
127315189f
Frontend QA: show currently sorted heuristic percentages in page list (#1720)
Closes #1690

Swaps out the "+n" number for a percentage when sorting by percentage
values
2024-04-22 16:44:59 -04:00
sua yoo
e56c412737
Add QA columns to archived item list (#1683)
- Shows QA review status, latest QA state, and QA run count in archived
item list. "Created by" column replaced for space and moved to "Date
Created" tooltip
- Enables sort archived items by QA columns
- Adds tooltip to all columns except name
- Hides non-applicable columns in when archived items are filtered to
uploads only
- Fixes issue where tooltips weren't activated on hover when using
`btrix-table`
- Minor refactor to reuse status labels/colors, renames page review ->
page approval to clarify
2024-04-22 13:19:07 -07:00
sua yoo
db6091b09c
Fix QA run deletion (#1721)
Fixes unable to delete QA run from the QA tab "Analysis Runs" list.
2024-04-22 13:15:42 -07:00
Ilya Kreymer
b574f00d2b
Add Repository Index + Chart Rename + Docs Rename (#1708)
Repository Index: Generate an index.yaml in ./docx/helm-repo/index.yaml
to allow for browsertrix to be a helm repository.
docs: rename docs.browsertrix.cloud -> docs.browsertrix.com
docs: update deployment doc to mention helm repo as preferred way to
install
docs build action: generate repository index in GH action
publish action: update auto-generated message to mention installing from
the repo.

---------
Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
2024-04-21 09:42:25 -07:00
Tessa Walsh
d31bdd2a21
Change resource table to be based on mime type (#1698)
Follow-up to #1689 

Instead of just using resource types, using a combination of mime type, resource type and extension analysis.
Current logic is:
    - if resourceType is script, stylesheet, image, font, use that definitely
    - if resourceType is fetch/xhr, also check for extension, specifically for images
    - categorize favicon.ico separately as 'favicon'
    - also check for extension for json
    - also check for pdf by type + extension
    - categorize 'ping' as 'other'
    - by default, use the first part of mime as the type
2024-04-20 19:02:15 -07:00
Emma Segal-Grossman
c5b808ba40
Ensure dates are formatted with the current app locale (and not browser default) (#1697)
### Motivation

While using the browser default locale is often good enough, we probably
want more full control over locales, especially when we allow users to
choose their own locale — it's a poor experience to not have dates and
numbers formatted consistently with your chosen locale.

### Changes

Ensures (almost) all instances of `<sl-format-date>` as well as `Intl.*`
have the correct locale passed into them from our Lit localization
system.

The one exception here is in `frontend/src/utils/number.ts` where
ordinal suffixes aren't localized, so the locale is hardcoded to `en` —
I'll revisit this in the future.
2024-04-20 16:30:33 -04:00
Henry Wilkinson
a60f56b87a
Frontend QA Polish Changes (#1703)
Fixes #1696 

- Inverts the toggle button state for screenshot comparison, is now
untoggled by default
- Changes the Resources tab to a puzzle piece
- Parity with the metaphor used in ReplayWeb.page. Would like to leave
databases to represent actual databases... Which given the app could
very well make their way in here!
- Fixes the dashed boarder radius being applied to the text comparison
tab
- Sets the data table header row to `position: sticky;` so it's always
visible if the table scrolls!
- This applies to all data tables, tested the one in QA review, the
overview page, and the org settings members list
- Casing changes for parity with other dropdown sorting controls

Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
2024-04-19 22:26:04 -04:00
Emma Segal-Grossman
ecaa851688
Fix workflow language setting showing HTML code in select element (#1702)
Closes #1655

### Changes

Removes the separate element inside the `<sl-select>` and instead
doesn't show localized language unless it's different from the language
in the current locale
2024-04-19 08:39:04 -07:00
Tessa Walsh
80008a2853
Add post load delay to Browsertrix (#1700)
Fixes #1699 

Adds post load delay to:
- Backend `RawCrawlConfig` model
- Frontend (workflow editor and config details component)
- Workflow setup docs
2024-04-18 20:03:47 -07:00
Henry Wilkinson
3e4b0e491a
Frontend: App Branding! (#1592)
Closes #424 

### Changes
- Adds Browsertrix logo to the nav bar!!
  - Will license the typeface (Konsole) as soon as this gets merged.
- Changes the theme colour to Webrecorder's turquoise brand colour
- Adjusts the usage of `primary` vs `blue` for elements where it
shouldn't be the same
- Changes the _Cancel & Discard_ button of the cancel crawl dialogue to
`danger` button variant
- Replaces the Replay icon with the new ReplayWebpage icon!
- Fixes the favicon SVG linking (wrong name, oops!)
- Fills the microscope lens in the microscope icon
- Removes the old btrix-cloud.svg logo

Co-authored-by: sua yoo <sua@webrecorder.org>
2024-04-17 23:40:02 -04:00
sua yoo
f0921feb70
Display QA resources as table (#1692)
- Renders QA resource data as a basic table
- Updates screenshot and resource tab icons
2024-04-17 19:43:34 -07:00
Emma Segal-Grossman
9f0a1fcc95
QA page details (#1656)
### Changes
- improves overflow issues at smaller screen sizes
- adds icons to buttons
- updates text & layout to match mocks
- changes primary button & button options depending on if there's a
qa run available
- adds a loading state for qa run status & buttons
- updates `<btrix-crawl-status>` with a `type` param allowing for
crawls, uploads, and QA runs
- Updates `<btrix-alert>` to match `<sl-tag>` styling
- Improves overflow issues at smaller viewport sizes by making tab
lists overflow when necessary

### Features
- Ability to start/stop/cancel QA runs
https://github.com/webrecorder/browsertrix-cloud/pull/1666 @SuaYoo
- Ability to see progress of current QA run @emma-sg 
- Ability to delete QA runs @emma-sg 
- Ability to download QA run files
https://github.com/webrecorder/browsertrix-cloud/pull/1666 @SuaYoo
- Only able to start review if a QA Run is finished (for now,
initial pass). @SuaYoo
- Only most recent running or successful QA run is displayed in
header

---------

Co-authored-by: sua yoo <sua@webrecorder.org>
Co-authored-by: sua yoo <sua@suayoo.com>
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
2024-04-17 15:17:13 -07:00
Henry Wilkinson
6cabb9c875
Changes download icons to cloud-download (#1688)
And now they're all the same!
2024-04-17 15:27:38 -04:00
Ilya Kreymer
835014d829
restrict qa runs to a 'min_qa_crawler_image' if set in the chart (#1685)
- fixes #1684
- can be used to optionally restrict QA to only some crawls (eg. with
browsertrix-crawler>=1.0.0)
- enforce error on backend (return 400) and handle special error on the
frontend
2024-04-17 08:48:33 -07:00
emma
ed08b734ba Fix failing Webpack build
- Includes eslint-related files in Dockerfile build step
- Switches to using a cache mount in Dockerfile build step for yarn
cache, rather than deleting yarn cache, which should speed up most
builds
2024-04-10 14:40:44 -04:00
Tessa Walsh
172a9bf0cd
Change crawl.reviewStatus to 1-5 scale int (#1664) 2024-04-09 17:51:06 -07:00
Emma Segal-Grossman
9aba24a90e
Emit eslint errors during webpack builds & during dev (#1667)
Following [discussion on
Discord](https://discord.com/channels/895426029194207262/910966759165657161/1227299497546223707),
this enables ESLint errors showing up during dev within Webpack, and
also enforces that all issues (both warnings and errors) will cause
builds to fail during CI.

Other changes:
- Updates some dependencies (primarily to versions that are
type-checked)
2024-04-09 17:42:31 -04:00
Tessa Walsh
435ca08f26
Remove URL prefix dropdown from new browser profile screen (#1660)
Switch to a text field and prepend `https://` as prefix if no valid
prefix is provided in the provided URL.
2024-04-08 15:36:21 -04:00
Ilya Kreymer
a7cda3b11b version: bump to 1.10.0-beta.1 2024-04-05 18:24:14 -07:00
sua yoo
83c9203a11
Initial QA Review UI! (#1624)
QA Details page:
- Enables QA tab with ability to start automated analysis QA Run + view a and manual review status
- Pages listed with review status + overall crawl review status shown on QA details (relates to #1508)
- Initial placeholder for QA run analytics (part of #1589)
- Addresses a good deal of #1477

Automated Analysis QA in Review Mode:
- Ability to select from multiple analysis QA runs / view QA runs in QA details
- Shows analysis screenshot, text and resources compare and replay tabs (fixes #1496)
- Sorting by worst screenshot / worst text score for each QA run
- Includes pages sidebar with screenshot/text/resource compare results (fixes #1497)

Manual Review QA in Review Mode:
- Per-page replay available as separate tab (fixes #1499)
- Supports thumbs up, thumbs down, notes for each page
- Supports entering review status approval (good/acceptable/bad can be entered when finishing review

---------
Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
Co-authored-by: Ilya Kreymer <ikreymer@gmail.com>
Co-authored-by: Henry Wilkinson <henry@wilkinson.graphics>
2024-04-04 15:09:52 -07:00
Henry Wilkinson
432a727218
Frontend: Fixes the "Replay Latest Crawl" button path (#1636)
- Fixes the path for the "Replay Latest Crawl" button on the watch crawl
page when the crawl workflow isn't running
2024-04-03 18:19:46 -04:00
Ilya Kreymer
86311ab4ea
merge 1.9.5 fixes (#1637)
retry loading profile if initial load fails, follow-up to #1604
- Add missing setTimeout to retry profile loading

bump RWP to 1.8.15
2024-03-27 21:49:19 -07:00
Henry Wilkinson
275f69493f
Frontend: icon-button Cleanup (#1628)
Closes #1591

### Changes
- Converts one instance of a button with an icon in it to an `icon-button`
- Makes all the trashcan icon buttons have a red hover state
- Adds localization function & placeholder to upload dialog "Name" field
- Adds localization functions to some missing icon-button label
instances
- Adds a few missing icon button labels

Co-authored-by: sua yoo <sua@suayoo.com>
Co-authored-by: sua yoo <sua@webrecorder.org>
2024-03-27 14:57:32 -04:00
Emma Segal-Grossman
d2862ff797
Emit more modern code for browsers (#1614)
Adds a `browserlist` field to `package.json`, which Webpack picks up so
it doesn't convert nullish coalescing operators into obfuscated messes
like `key !== null && key !== void 0 ? key : null`.

This improves output size a little & improves the debugging experience
as well.

Tested in Chrome, FF, & Safari locally and didn't encounter any issues.
2024-03-19 17:22:41 -04:00
Emma Segal-Grossman
41d6e79cb3
Clean up ESLint warnings in main (#1616)
See title.

The only place this changes behaviour is in the placeholder page list,
which will be replaced by the real one shortly, so I'm going to just
merge this.
2024-03-19 17:22:27 -04:00
Emma Segal-Grossman
2c44011b5b
Update node version mentioned in docs (#1615)
Follow-up to #1612 

cc @SuaYoo
2024-03-19 16:40:53 -04:00
sua yoo
dcd2efcd3b
Fix asset imports in tests (#1611)
Addresses failing test in
https://github.com/webrecorder/browsertrix-cloud/pull/1592 by fixing
asset imports in unit tests. Unit tests now import an empty string for
all assets--note: if we want to test actual asset content, will need to
update this config.
2024-03-19 13:06:07 -07:00
sua yoo
26820cbaba
Upgrade Node 16 > 18 (#1612) 2024-03-19 13:02:08 -07:00
sua yoo
b43f550ff3
Fix missing page component imports (#1610)
Missed bug introduced in
https://github.com/webrecorder/browsertrix-cloud/pull/1608, adds back
imports and disables `import-x` rule.
2024-03-18 20:55:35 -07:00
Emma Segal-Grossman
91df222cdf
Fix mismatch in prettier import order config (#1609)
Follow-up to #1608 — quick fix for an issue I encountered after merging
main into #1497

Just going to directly merge once this completes (cc @SuaYoo for
visibility)
2024-03-18 22:14:13 -04:00
sua yoo
c9c57fafee
fix: hide wip qa tab 2024-03-18 18:59:24 -07:00
Emma Segal-Grossman
b1e2f1b325
Add ESLint rules for import ordering (#1608)
Follow-up from
https://github.com/webrecorder/browsertrix-cloud/pull/1546#discussion_r1529001599
(cc @SuaYoo)

- Adds `eslint-plugin-import-x` and
`@ianvs/prettier-plugin-sort-imports` and configures rules for them both
so imports get sorted on format & on lint.
- Runs both on everything!
2024-03-18 21:50:02 -04:00
sua yoo
6e9c14aea6
test: fix frontend auth unit test 2024-03-18 11:00:13 -07:00
Henry Wilkinson
1093aa959f
Adds favicons! (#1584)
Closes #328 

## Changes

The app has favicons now!

Added:
- SVG 
- Changes to slightly brighter colours in dark mode for better contrast!
- Fallback ICO
- `apple-touch-icon` (some browsers also use this, not just iOS)
- Web manifest with app description
- Two web manifest icon sizes should users add the app to their local
launcher (Windows' Start or macOS' Dock / Launchpad
  - Lighting & render by @emma-sg, thanks!

The manifest and icons are copied to the root directory at build time by
webpack. All of the dedicated ways of doing this seemed more complicated
than this?

---------
Co-authored-by: emma <hi@emma.cafe>
2024-03-16 15:11:31 -07:00
Ilya Kreymer
e7af081af1
profile browser fixes: better resource usage + load retry (main) (#1604)
- Backend: Use separate resource constraints for profiles: default
profile browser resources to either 'profile_browser_cpu' /
'profile_browser_memory' or single browser 'crawler_memory_base' /
'crawler_cpu_base', instead of scaled to the number of browser workers

- Frontend: check that profile html page is loading, keep retrying if
still getting nginx error instead of loading an iframe with the error.

Fixes #1598 (Copy of #1599 from 1.9.4)
2024-03-16 15:07:04 -07:00
sua yoo
eb7036bf87
Add QA tab to archived item detail (#1590)
Adds tab with placeholders as a starting point to work off of. The badge and button is not currently linked up to any data or actions.
2024-03-12 14:05:16 -07:00
Henry Wilkinson
16e8b761c0
Frontend: Various icon updates (#1569)
Closes #1568 

## Changes
- Status icons are now filled!
- Uses Bootstrap Icons' new `copy` icon for all actions involving
copying to clipboard!
  - Finally! A real copy icon! 🎉 
  - Removes `copy-code.svg` as it is no longer used
- Actions involving duplicating objects still use `files`... Which is
good! Now they have distinct symbols!
- Adds orange to the tailwind colour palette

---------

Co-authored-by: sua yoo <sua@webrecorder.org>
2024-03-12 15:18:10 -04:00
sua yoo
9f312c075e
Manually approve pages in QA review (#1576)
- Automatically update view to first page if page ID isn't specified
- Show current page URL in location bar (resolves
https://github.com/webrecorder/browsertrix-cloud/issues/1495)
- Approve, reject, or leave notes on a page
- Display temporary list of links to pages in the sidebar
2024-03-12 10:08:51 -07:00
Henry Wilkinson
8ba29ca776
Browsertrix Cloud → Browsertrix text rename (#1466)
Part of #1241

### Changes
- Renames all instances of "Browsertrix Cloud" to "Browsertrix" on the
front end, emails, and documentation

---------

Co-authored-by: emma <hi@emma.cafe>
2024-03-12 11:30:05 -04:00
Ilya Kreymer
08f6847194
Configurable Max Scale for frontend (#1557)
Allow maximum scale option to be fully configurable via
`max_crawl_scale`. Already configurable on the backend, and now exposed
to the frontend via API `/api/settings` `maxCrawlScale` value.

The workflow editor and workflow details are updated to allow selecting
the scale up to the maxCrawlScale setting (which defaults to 3 if not
set).
2024-03-11 16:21:20 -07:00
Emma Segal-Grossman
8462c08206
Fix a couple linting issues (#1565) 2024-03-11 16:20:37 -07:00
sua yoo
548261e663
Fix shoelace icon loading (#1587)
Loads `sl-icon` synchronously to get correct base path when running
webpack-dev-server.
2024-03-11 13:38:58 -07:00
Ilya Kreymer
ea494fa6e6
Merge V1.9.3 changes into main (#1583)
- Fix execution time checking by keeping lastUpdatedTime in db by
@ikreymer in https://github.com/webrecorder/browsertrix-cloud/pull/1573
- disable postcss-lit for var css
- Prevent closing tooltips from closing collection share dialog by
@SuaYoo in https://github.com/webrecorder/browsertrix-cloud/pull/1579
- Fix pending exclusion pagination by @SuaYoo in
https://github.com/webrecorder/browsertrix-cloud/pull/1578
- Fix regex escape in exclusion editor text match by @SuaYoo in
https://github.com/webrecorder/browsertrix-cloud/pull/1577

---------
Co-authored-by: emma <hi@emma.cafe>
Co-authored-by: sua yoo <sua@webrecorder.org>
2024-03-06 15:38:22 -08:00
Emma Segal-Grossman
780dd09321
Create ArchivedItemPage and ArchivedItemPageComment types (#1567)
Based on #1534

Figured this should be in place so we can work on other front-end things
with these, rather than dealing with refactoring later

<!-- Fixes #issue_number -->

### Changes

- Adds `ArchivedItemPage` and `ArchivedItemPageComment` types from #1534
(thank you @SuaYoo!)
- Adds typedefs for match and resource count properties
- sets properties optional in the db schema to optional in the type as
well

### Manual testing

1.

### Screenshots

| Page | Image/video |
| ---- | ----------- |
|      |             |

<!-- ### Follow-ups -->
2024-03-04 18:52:09 -05:00
Emma Segal-Grossman
f6e82d9335
Archived item nav button quickfix (#1543)
Navigation buttons weren't being laid out properly and were overflowing
in unintentional ways, this fixes that, and then also updates navigation
buttons & puts them into use everywhere elements service the purpose of
navigation buttons were used instead!


<img width="452" alt="Screenshot 2024-02-24 at 10 37 41 PM"
src="https://github.com/webrecorder/browsertrix-cloud/assets/5727389/a77ed1be-3f95-4e03-a4d8-e3740229621e">
<img width="519" alt="Screenshot 2024-02-24 at 10 38 06 PM"
src="https://github.com/webrecorder/browsertrix-cloud/assets/5727389/684bc9a4-bec2-4258-b264-662dc441e75f">
<img width="273" alt="Screenshot 2024-02-24 at 10 38 20 PM"
src="https://github.com/webrecorder/browsertrix-cloud/assets/5727389/863d9d9a-121e-4682-8c12-eaf94ae69c7c">
<img width="410" alt="Screenshot 2024-02-24 at 10 38 25 PM"
src="https://github.com/webrecorder/browsertrix-cloud/assets/5727389/b321375c-d063-4c00-b876-36a592c85a35">
<img width="200" alt="Screenshot 2024-02-24 at 10 38 37 PM"
src="https://github.com/webrecorder/browsertrix-cloud/assets/5727389/62bbb5d1-d4f3-4ba3-8cd5-035242424f3a">
2024-02-25 02:04:53 -05:00
Tessa Walsh
fa35d8994f Disable useSitemap by default in new workflows (#1541) 2024-02-22 23:54:23 -08:00
Ilya Kreymer
ba18abc063 Fix URL List showing scope accidentally (#1536)
fix call from when(...) to call function directly, avoid implicit true,
which results in page scope being shown for url list.
fixes #1535

To test:
1) Create new workflow of type URL List
2) Ensure the Crawl Scope drop down is not shown.

---------

Co-authored-by: sua yoo <sua@suayoo.com>
2024-02-22 23:54:23 -08:00
sua yoo
91ff95c8e9
Add new WIP QA Review page (#1500)
Resolves https://github.com/webrecorder/browsertrix-cloud/issues/1493

<!-- Fixes #issue_number -->

### Changes

Adds WIP QA page with basic grid layout sections and navigation.

### Manual testing

Page can be access by adding `/review/screenshots` or `/review/replay`
to a crawl detail page URL. For example:
```
/orgs/suas-dev-sandbox-2/items/crawl/manual-20240124023524-422e41d6-97d/review/screenshots
```

---------
Co-authored-by: emma <hi@emma.cafe>
2024-02-20 00:26:38 -08:00
Ilya Kreymer
a8e3ff1141 version: bump to 1.10.0-beta.0 2024-02-20 00:22:29 -08:00
Ilya Kreymer
c1cffe9ecd version: bump to 1.9.1 2024-02-16 09:44:18 -08:00
Ilya Kreymer
4cbe134a0e
one hop out: remove errant '|| true' from condition (#1532)
Fixes #1531, one hop out checkbox always checked.
2024-02-16 09:43:14 -08:00
Ilya Kreymer
64bf21311d version: bump to 1.9.0! 2024-02-14 13:30:46 -08:00
Ilya Kreymer
1d266e3cea bump to 1.9.0.beta.5 2024-02-12 18:29:39 -08:00
Emma Segal-Grossman
3ed10ad893
Add comments I meant to add in #1528 (#1529)
Tessa merged #1528 before I got to add these comments lol (it's my
fault, should have left the PR as draft until I was actually ready)
2024-02-12 19:33:16 -05:00
Emma Segal-Grossman
d88a6eb07f
Include leading zero in months when accessing usage and quota data (#1528)
Closes #1527 

Improves front-end types & ensures the data being accessed matches the
data sent by the back-end.

Tested by hand by using the returned data from the `/orgs/${orgId}`
endpoint in prod where this is happening in dev
2024-02-12 19:27:42 -05:00
Ilya Kreymer
4bc8152640 version: bump to 1.9.0-beta.4 2024-02-09 16:17:13 -08:00