Commit Graph

1274 Commits

Author SHA1 Message Date
Tessa Walsh
18e5ed94f1
Add migration to set profile modified date (#1832)
If modified field doesn't exist on older browser profiles, set it equal
to created date to match what we do for new profile creation.
2024-05-29 15:56:27 -04: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
Tessa Walsh
7e5d742fd1
Backend: Add modified field and track created/modifier users for profiles (#1820)
This PR introduces backend changes that add the following fields to the
Profile model:
- `modified`
- `modifiedBy`
- `modifiedByName`
- `createdBy`
- `createdByName`

Modified fields are set to the same as the created fields when the
resource is created, and changed when the profile is updated (profile
itself or metadata).

The list profiles endpoint now also supports `sortBy` and
`sortDirection` options. The endpoint defaults to sorting by `modified`
in descending order, but can also sort on `created` and `name`.

Tests have also been updated to reflect all new behavior.
2024-05-28 17:25:22 -04: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
85cd214101
Fix regression to changing user roles via PATCH /user-role API (#1824)
clean up adding user vs changing role logic:
- when adding user, ensure user doesn't exist
- when changing roles, ensure user does exist

add test for changing roles of existing user

Fixes #1821
2024-05-24 10:41:05 -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
Ilya Kreymer
3280f65680
frontend build check: build frontend docker image (#1804)
Build the docker image to ensure image builds correctly, partially replacing local install + build (though still running tests + lint outside docker)
2024-05-15 18:13:07 -07:00
Ilya Kreymer
1ca107fa2b
quickfix: fix for additional lint error in updated pylint (#1805) 2024-05-15 17:00:15 -07:00
sua yoo
0479489bd8
Allow users to configure offset when viewing crawl queued URLs (#1581) 2024-05-15 14:42:00 -07:00
Henry Wilkinson
1a668fe82f
Adds QA features to user docs (#1784)
Fixes #1695

### Changes
- Adds Crawl Review user docs
- Adds Quality Assurance section to the Archived Items page
- Adds note in the user roles list on crawl review not being available for viewers

Co-authored-by: Emma Segal-Grossman <hi@emma.cafe>
Co-authored-by: sua yoo <sua@webrecorder.org>
Co-authored-by: Ilya Kreymer <ikreymer@users.noreply.github.com>
2024-05-15 15:01:44 -04: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
Ilya Kreymer
26abbddd62
regression fix: remove 'project' from non-raw crawl object getters, (#1778)
unnecessary projection prevents creating Crawl object, now removed

Fixes #1777
2024-05-02 01:02:22 +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
Ilya Kreymer
375057a819
check that status.lastUpdatedTime is set before attempting to subtract! (#1754)
Don't subtract none value!
2024-04-30 20:33:46 +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
Henry Wilkinson
9c7fdb4fac
Add note on checking browser profiles for scheduled crawls (#1763) 2024-04-30 06:25:42 +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
f6c0791dc1
fix missing settings / typos: (#1748)
- ensure max_crawler_memory_size is inited before it is set!
- pass profile_browser_memory / profile_browser_cpu from chart values
- map volume to /tmp/home to avoid persisting /tmp for profiles
2024-04-25 09:00:17 +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
f286f04130
Typo Fix: fix typos in setting max crawler memory (#1747)
Co-authored-by: Tessa Walsh <tessa@bitarchivist.net>
2024-04-24 10:29:09 -04:00
Ilya Kreymer
f89027ac89 version: 1.10.0-beta.3 2024-04-24 15:45:17 +02:00
Ilya Kreymer
ec74eb4242
operator: add 'max_crawler_memory' to limit autosizing of crawler pods (#1746)
Adds a `max_crawler_memory` chart setting, which, if set, will
defines the upper crawler memory limit that crawler pods can be resized up to.
If not set, auto resizing is disabled and pods are always set to 'crawler_memory' memory
2024-04-24 15:16:32 +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