Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3890 UI for transkribus #4336

Draft
wants to merge 30 commits into
base: development
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
619dd1c
Checkpoint for #3890
benwbrum Mar 26, 2024
43f3a48
Merge branch 'development' into 3890-ui-for-transkribus
benwbrum Apr 9, 2024
e0aef9e
Merge branch 'development' into 3890-ui-for-transkribus
benwbrum Apr 23, 2024
a2c04c7
Checkpoint for ai jobs
benwbrum Apr 24, 2024
d901cec
AI job checkpoint
benwbrum Apr 29, 2024
0ba8717
New routes for #3890
benwbrum May 1, 2024
683e5a8
New globals for #3890
benwbrum May 1, 2024
cca8c5f
Merge branch 'development' into 3890-ui-for-transkribus
benwbrum May 8, 2024
4b84c92
FSM for AI jobs
benwbrum Jun 3, 2024
63de970
Merge branch 'development' into 3890-ui-for-transkribus
benwbrum Jul 6, 2024
38995ed
Page status diagrams
benwbrum Jul 15, 2024
c35c835
Checkpoint on page documentation
benwbrum Jul 16, 2024
172c478
Page state diagrams
benwbrum Jul 18, 2024
32f5ccd
Add new state flow
benwbrum Jul 24, 2024
ca213c4
FSM and test stubs
benwbrum Aug 7, 2024
5b7eb62
Tests for ai text page processing task
benwbrum Aug 22, 2024
d82dc5d
Change serialization
benwbrum Aug 27, 2024
1ae6a08
Revert serialization
benwbrum Aug 28, 2024
772d5b7
Tasks should track external process IDs and errors
benwbrum Aug 28, 2024
1baf40d
First test for transkribus page task
benwbrum Aug 30, 2024
e9eaf4f
Tests for Transkribus tasks and page jobs
benwbrum Sep 5, 2024
efc7660
4290 - Improve collection page edit
WillNigel23 Sep 12, 2024
5daa70d
Initial real-world testing of Transkribus jobs
benwbrum Sep 16, 2024
d8d1371
Merge branch 'development' into 3890-ui-for-transkribus
benwbrum Sep 16, 2024
1755c8e
Merge branch '4290-improve-collection-page-edit' into 3890-ui-for-tra…
benwbrum Sep 16, 2024
b206016
Fix specs
WillNigel23 Sep 16, 2024
4b3a39d
Page HTR jobs UI checkpoint
benwbrum Sep 16, 2024
23b1d4c
Merge branch '4290-improve-collection-page-edit' into 3890-ui-for-tra…
benwbrum Sep 17, 2024
d6a7636
New job checkpoint
benwbrum Sep 17, 2024
3e5dd0f
HTR job checkpoint
benwbrum Sep 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ end

group :test do
gem 'capybara'
gem 'coveralls', require: false
gem 'database_cleaner'
gem 'faker'
gem 'rails-controller-testing'
gem 'selenium-webdriver'
gem 'shoulda'
Expand Down
29 changes: 29 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ GEM
clipboard-rails (1.7.1)
coderay (1.1.3)
concurrent-ruby (1.2.3)
coveralls (0.7.1)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
crack (1.0.0)
bigdecimal
rexml
Expand Down Expand Up @@ -212,6 +218,7 @@ GEM
diff-lcs (1.5.1)
diffy (3.4.2)
docile (1.4.0)
domain_name (0.6.20240107)
dotenv (2.8.1)
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
Expand All @@ -234,6 +241,8 @@ GEM
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
faker (3.4.2)
i18n (>= 1.8.11, < 2)
faraday (2.8.1)
base64
faraday-net_http (>= 2.0, < 3.1)
Expand All @@ -260,6 +269,9 @@ GEM
activesupport (>= 2)
nokogiri (>= 1.4)
htmlentities (4.3.4)
http-accept (1.7.0)
http-cookie (1.0.7)
domain_name (~> 0.5)
http_accept_language (2.1.1)
httparty (0.21.0)
mini_mime (>= 1.0.0)
Expand Down Expand Up @@ -342,6 +354,9 @@ GEM
rack-contrib (>= 1.1, < 3)
railties (>= 3.0.0, < 8)
method_source (1.1.0)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0903)
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.6)
Expand All @@ -367,6 +382,7 @@ GEM
net-smtp (0.5.0)
net-protocol
net-ssh (7.2.3)
netrc (0.11.0)
newrelic_rpm (9.9.0)
nio4r (2.7.1)
nokogiri (1.15.6)
Expand Down Expand Up @@ -493,6 +509,11 @@ GEM
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.6)
rinku (2.0.6)
rmagick (5.5.0)
Expand Down Expand Up @@ -594,7 +615,10 @@ GEM
net-ssh (>= 2.8.0)
ssrf_filter (1.1.2)
stackprof (0.2.26)
sync (0.5.0)
temple (0.10.3)
term-ansicolor (1.11.2)
tins (~> 1.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
terser (1.2.2)
Expand Down Expand Up @@ -627,6 +651,9 @@ GEM
tilt (2.3.0)
timeago_js (3.0.2.2)
timeout (0.4.1)
tins (1.33.0)
bigdecimal
sync
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
Expand Down Expand Up @@ -679,6 +706,7 @@ DEPENDENCIES
carrierwave
charlock_holmes
clipboard-rails
coveralls
database_cleaner
devise
devise-encryptable
Expand All @@ -690,6 +718,7 @@ DEPENDENCIES
edtf
edtf-humanize
factory_bot_rails
faker
flamegraph
forty_facets
friendly_id
Expand Down
4 changes: 4 additions & 0 deletions app/assets/images/symbols.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/assets/stylesheets/ai_job.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the ai_job controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/ai_jobs.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the ai_jobs controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/ai_results.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the ai_results controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
4 changes: 2 additions & 2 deletions app/assets/stylesheets/components/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ button, .button, input[type="submit"], input[type="reset"], input[type="button"]
}

// Button without content
button:empty, .button:empty {
button:empty, .button:empty:not(input) {
padding: 0;
width: $btnHeight;
height: $btnHeight;
Expand Down Expand Up @@ -160,4 +160,4 @@ button:empty, .button:empty {
position: relative;
}
}
}
}
86 changes: 41 additions & 45 deletions app/assets/stylesheets/scaffolds.scss
Original file line number Diff line number Diff line change
@@ -1,69 +1,65 @@
body {
background-color: #fff;
color: #333;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
}
margin: 33px; }

p, ol, ul, td {
body, p, ol, ul, td {
font-family: verdana, arial, helvetica, sans-serif;
font-size: 13px;
line-height: 18px;
}
line-height: 18px; }

pre {
background-color: #eee;
padding: 10px;
font-size: 11px;
}
font-size: 11px; }

a {
color: #000;
&:visited {
color: #666;
}
&:hover {
color: #fff;
background-color: #000;
}
}
color: #000; }

a:visited {
color: #666; }

a:hover {
color: #fff;
background-color: #000; }

th {
padding-bottom: 5px; }

div {
&.field, &.actions {
margin-bottom: 10px;
}
}
td {
padding: 0 5px 7px; }

div.field,
div.actions {
margin-bottom: 10px; }

#notice {
color: green;
}
color: green; }

.field_with_errors {
padding: 2px;
background-color: red;
display: table;
}
display: table; }

#error_explanation {
width: 450px;
border: 2px solid red;
padding: 7px;
padding-bottom: 0;
padding: 7px 7px 0;
margin-bottom: 20px;
background-color: #f0f0f0;
h2 {
text-align: left;
font-weight: bold;
padding: 5px 5px 5px 15px;
font-size: 12px;
margin: -7px;
margin-bottom: 0px;
background-color: #c00;
color: #fff;
}
ul li {
font-size: 12px;
list-style: square;
}
}
background-color: #f0f0f0; }

#error_explanation h2 {
text-align: left;
font-weight: bold;
padding: 5px 5px 5px 15px;
font-size: 12px;
margin: -7px -7px 0;
background-color: #c00;
color: #fff; }

#error_explanation ul li {
font-size: 12px;
list-style: square; }

label {
display: block; }
25 changes: 15 additions & 10 deletions app/assets/stylesheets/sections/collection.scss
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
display: block;
overflow: hidden;
text-overflow: ellipsis;

.userpic {
font-size: 26px;
margin-right: 6px;
Expand Down Expand Up @@ -306,7 +306,7 @@

.category-article dd p {
width: 33%;
display: flex;
display: flex;
}

.category-article dd p a {
Expand Down Expand Up @@ -448,7 +448,7 @@
white-space: normal !important;
vertical-align: top;
}
td:nth-child(1), th {
td:nth-child(1), th {
width: 30%;
}
td:nth-child(2) {
Expand All @@ -465,7 +465,6 @@
vertical-align: top;
}
select, .inline-btn, .select2 {
margin-left: 1em;
display: inline-block;

&.select2-hidden-accessible {
Expand Down Expand Up @@ -493,6 +492,12 @@
}
}

.page-settings {
.sidecol {
padding-top: 0.5em;
}
}

.side-tabs {
$textColor: #322;
float: left;
Expand Down Expand Up @@ -571,7 +576,7 @@
padding-right: 1em;
}
}

&.expanded {
.user-label {
display: inline-block;
Expand Down Expand Up @@ -619,7 +624,7 @@
background-color: $bgColor;
border-radius: 16px;
padding: 1em;

text-align: center;
color: $bodyFgLight;
}
Expand Down Expand Up @@ -654,12 +659,12 @@
&_format {
flex: 1 1 auto;
padding-right: 15px;

h5 {
display: flex;
align-items: center;
margin: 0 0 0.25em 0;

input {
width: 19px;
height: 19px;
Expand Down Expand Up @@ -712,12 +717,12 @@
&_format {
flex: 1 1 auto;
padding-right: 15px;

h5 {
display: flex;
align-items: center;
margin: 0 0 0.25em 0;

input {
width: 19px;
height: 19px;
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/sections/page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@

.page-image-preview {
text-align: center;
margin-bottom: 50px;
img {
height: auto;
max-width: 100%;
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/admin_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ class AdminController < ApplicationController

before_action :authorized?

PAGES_PER_SCREEN = 20

# no layout if xhr request
layout Proc.new { |controller| controller.request.xhr? ? false : nil }, :only => [:edit_user, :update_user, :new_owner, :expunge_confirmation, :expunge_user]

Expand Down
Loading
Loading