diff --git a/app/assets/stylesheets/protocols/protocol.scss b/app/assets/stylesheets/protocols/protocol.scss index 3d25b7cff..d885a8598 100644 --- a/app/assets/stylesheets/protocols/protocol.scss +++ b/app/assets/stylesheets/protocols/protocol.scss @@ -123,17 +123,17 @@ } .authors-data { - align-items: center; + align-items: baseline; display: flex; margin-top: -12px; min-height: 36px; .authors-list { - flex-basis: calc(100% - 90px); - flex-grow: 1; + font-weight: bold; line-height: 32px; margin-left: 8px; - font-weight: bold; + max-width: calc(100% - 90px); + position: relative; } * { @@ -260,10 +260,12 @@ .protocol-content { .protocol-name { + display: inline-block; font-size: 1.7em; font-weight: bold; margin-bottom: 32px; margin-top: 28px; + position: relative; } .repository-new-step { diff --git a/app/assets/stylesheets/shared/content/checklist.scss b/app/assets/stylesheets/shared/content/checklist.scss index 595628bd3..b5abf0f89 100644 --- a/app/assets/stylesheets/shared/content/checklist.scss +++ b/app/assets/stylesheets/shared/content/checklist.scss @@ -26,8 +26,10 @@ grid-template-columns: max-content auto; .step-checklist-text { + display: inline-block; margin-top: -.1em; - width: 100%; + position: relative; + width: fit-content; } &:hover.done .step-checklist-text { @@ -42,7 +44,7 @@ border-radius: 50%; height: 4px; margin-right: .5em; - margin-top: 1em; + margin-top: .4em; width: 4px; } diff --git a/app/assets/stylesheets/shared/inline_edit.scss b/app/assets/stylesheets/shared/inline_edit.scss index 8dcd9da5c..036d6fdaf 100644 --- a/app/assets/stylesheets/shared/inline_edit.scss +++ b/app/assets/stylesheets/shared/inline_edit.scss @@ -1,95 +1,11 @@ // scss-lint:disable SelectorDepth // scss-lint:disable NestingDepth -.sci-inline-edit { - align-items: flex-start; - display: flex; - transition: .4s $timing-function-sharp border; - &.editing .sci-inline-edit__content { - .sci-inline-edit__content { - padding-top: 0; - } - } - - .sci-inline-edit__content { - display: flex; - flex-direction: column; - flex-grow: 1; - margin-left: -.25em; - margin-right: .5rem; - min-height: 30px; - padding-left: .25em; - position: relative; - - textarea, - .sci-inline-edit__view { - line-height: 26px; - min-height: 30px; - padding: .1em .2em; - } - - .sci-inline-edit__view { - border: 1px solid transparent; - cursor: pointer; - white-space: pre-wrap; - width: 100%; - - &.blank { - color: $color-silver-chalice; - } - - &.hover-border:hover { - border: 1px solid $color-silver; - border-radius: 3px; - } - } - - textarea { - background-color: $color-white; - border: 1px solid $brand-focus; - border-radius: 4px; - outline: none; - overflow: hidden; - width: 100%; - - &:focus { - outline: none; - } - } - - .sci-inline-edit__error { - bottom: -16px; - color: $brand-danger; - font-size: 12px; - font-weight: normal; - line-height: 12px; - position: absolute; - } - } - - &.editing { - margin-top: 0; - - .sci-inline-edit__content { - &.error { - border-color: $brand-danger; - margin-bottom: 16px; - - textarea { - border-color: $brand-danger; - } - } - } - - .sci-inline-edit__control { - margin: 0 .25em; - max-height: 30px; - max-width: 30px; - - &.btn-disabled { - background: $color-silver-chalice; - color: $color-concrete; - } - } - } +.sci-cursor-edit { + cursor: url("/images/icon_small/edit.svg") 0 16, auto; +} + +.inline-edit-placeholder:empty::before { + content: attr(placeholder); + display: block; } diff --git a/app/assets/stylesheets/steps/step.scss b/app/assets/stylesheets/steps/step.scss index e2346f5a5..b7c71eed5 100644 --- a/app/assets/stylesheets/steps/step.scss +++ b/app/assets/stylesheets/steps/step.scss @@ -18,9 +18,10 @@ align-items: baseline; border-radius: 4px; display: flex; - flex-basis: 80%; + flex-basis: 100%; position: relative; padding-top: .4em; + gap: .5em; .step-name-edit-icon { background: linear-gradient(90deg, @@ -65,7 +66,6 @@ .step-name-container { align-self: baseline; - flex-grow: 1; font-size: 16px; font-weight: bold; @@ -221,7 +221,6 @@ border-radius: 4px; display: flex; min-height: 40px; - overflow: hidden; position: relative; &.editing-name { @@ -242,8 +241,8 @@ .step-element-name { font-weight: bold; - width: 100%; - + margin-bottom: 2em; + position: relative; .step-element-number { display: inline-block; diff --git a/app/javascript/vue/label_template/container.vue b/app/javascript/vue/label_template/container.vue index 91973c2b5..abb3bb858 100644 --- a/app/javascript/vue/label_template/container.vue +++ b/app/javascript/vue/label_template/container.vue @@ -10,9 +10,9 @@ :characterMinLimit="2" :allowBlank="false" :attributeName="i18n.t('label_templates.show.name_error_prefix')" + :placeholder="i18n.t('label_templates.show.name_placeholder')" :autofocus="editingName" :editOnload="newLabel" - :customClasses="['hover-border']" @editingEnabled="editingName = true" @editingDisabled="editingName = false" @update="updateName" @@ -35,7 +35,6 @@ :attributeName="i18n.t('label_templates.show.description_error_prefix')" :placeholder="i18n.t('label_templates.show.description_placeholder')" :autofocus="editingDescription" - :customClasses="['hover-border']" @editingEnabled="editingDescription = true" @editingDisabled="editingDescription = false" @update="updateDescription" diff --git a/app/javascript/vue/protocol/container.vue b/app/javascript/vue/protocol/container.vue index 85a345b86..e0bc7d809 100644 --- a/app/javascript/vue/protocol/container.vue +++ b/app/javascript/vue/protocol/container.vue @@ -71,7 +71,6 @@ :placeholder="i18n.t('my_modules.protocols.protocol_status_bar.enter_name')" :allowBlank="!inRepository" :attributeName="`${i18n.t('Protocol')} ${i18n.t('name')}`" - :customClasses="['hover-border']" @update="updateName" /> diff --git a/app/javascript/vue/protocol/protocolMetadata.vue b/app/javascript/vue/protocol/protocolMetadata.vue index 1a5eafdba..d6fc37938 100644 --- a/app/javascript/vue/protocol/protocolMetadata.vue +++ b/app/javascript/vue/protocol/protocolMetadata.vue @@ -56,7 +56,8 @@ :value="protocol.attributes.authors" :placeholder="i18n.t('protocols.header.add_authors')" :allowBlank="true" - :attributeName="`${i18n.t('Protocol')} ${i18n.t('authors')}`" + :attributeName="`${i18n.t('Protocol')} ${i18n.t('protocols.header.authors_list')}`" + :characterLimit="10000" @update="updateAuthors" /> diff --git a/app/javascript/vue/protocol/step.vue b/app/javascript/vue/protocol/step.vue index 85b05611c..b22143e6a 100644 --- a/app/javascript/vue/protocol/step.vue +++ b/app/javascript/vue/protocol/step.vue @@ -44,6 +44,7 @@ :allowBlank="false" :attributeName="`${i18n.t('Step')} ${i18n.t('name')}`" :autofocus="editingName" + :timestamp="i18n.t('protocols.steps.timestamp', { date: step.attributes.created_at, user: step.attributes.created_by })" :placeholder="i18n.t('protocols.steps.placeholder')" :defaultValue="i18n.t('protocols.steps.default_name')" @editingEnabled="editingName = true" @@ -52,9 +53,6 @@ @update="updateName" /> -
@@ -158,7 +156,6 @@
-
{{ i18n.t('protocols.steps.timestamp', {date: step.attributes.created_at, user: step.attributes.created_by}) }}