-
Notifications
You must be signed in to change notification settings - Fork 19
Add information about the journal above the fold in editorial form #2525
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
Open
amdomanska
wants to merge
18
commits into
develop
Choose a base branch
from
feature/4101_editorial_review_layout
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6ed695b
add information above the fold, adjust layout for shorter screens, cr…
amdomanska 97521a0
add testdrive and testbook files
amdomanska bd2fb5a
update the functional tests
amdomanska 8799d76
fix small layout issues, improve functional tests
amdomanska 8c51ae1
fix templates
amdomanska 4d6a6ea
small change in the testdrive
amdomanska f261d05
reverse seamless change
amdomanska 80fa5d1
fix naming, initialise jquery sooner
amdomanska cf34f2f
fix base, add journal type to const
amdomanska c1c24a6
add journal type to const
amdomanska 168549a
refactor
amdomanska 66487e9
change block to variable to remove repetition
amdomanska afcd0bf
Merge branch 'develop' into feature/4101_editorial_review_layout
amdomanska 4199746
Code refactoring
amdomanska 720db8c
Display and style confirmation message
amdomanska b15dc58
Include the functional tests in the standard application form tests
amdomanska 4d4e364
remove obsolete testdrive
amdomanska d7c512f
Merge branch 'develop' into feature/4101_editorial_review_layout
Steven-Eardley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,76 @@ | ||
| /* Page header */ | ||
|
|
||
| .page-header { | ||
| min-height: 150px; | ||
| min-height: 150px; | ||
|
|
||
| @media screen and (max-width: 768px) { | ||
| min-height: 100px; | ||
| } | ||
| @media screen and (max-width: 768px) { | ||
| min-height: 100px; | ||
| } | ||
|
|
||
| /* do not underline the links, unless in an alert */ | ||
| a:not(.alert a) { | ||
| text-decoration: none; | ||
| } | ||
| /* do not underline the links, unless in an alert */ | ||
| a:not(.alert a) { | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .feather { | ||
| position: relative; | ||
| } | ||
| .feather { | ||
| position: relative; | ||
| } | ||
| } | ||
|
|
||
| .above_the_fold--title { | ||
| margin-bottom: 1rem; | ||
| } | ||
|
|
||
| .above_the_fold h2 { | ||
| margin-top: 0; | ||
| margin-bottom: 1rem; | ||
| } | ||
|
|
||
| .above_the_fold--url { | ||
| color: #5c5956; | ||
| } | ||
|
|
||
| .above_the_fold--issns { | ||
| font-size: 0.9rem; | ||
| font-weight: bold; | ||
| color: $sanguine; | ||
| margin-top: 0; | ||
| margin-bottom: 1rem !important; | ||
| } | ||
|
|
||
| .button.button--tertiary.see_in_doaj { | ||
| margin-bottom: 0; | ||
| } | ||
|
|
||
| @media (max-width: 1279px) and (min-width: 768px) { | ||
| .button.button--tertiary.see_in_doaj { | ||
| margin-top: 1rem; | ||
| } | ||
| } | ||
|
|
||
| @media (min-height: calc((10rem + 105px) * 2.5)) { | ||
| main:has(> .main-header.fixed) { | ||
| margin-top: 10rem; | ||
| @media (max-width: 1279px) and (min-width: 768px) { | ||
| &:has(.button.button--tertiary.see_in_doaj){ | ||
| margin-top: 13rem; | ||
| } | ||
| .button.button--tertiary.see_in_doaj { | ||
| margin-top: 1rem; | ||
| } | ||
| } | ||
| .button.button--tertiary.see_in_doaj { | ||
| margin-top: 1rem; | ||
| } | ||
|
|
||
| .main-header.fixed { | ||
| position: fixed; | ||
| top: 75px; | ||
| left: 75px; | ||
| z-index: 1000; | ||
| background-color: white; | ||
| width: calc(100% - 75px); | ||
| padding: 25px 30px; | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,10 +3,6 @@ | |
| .dashboard { | ||
| font-size: 18px; | ||
|
|
||
| h1 { | ||
| margin-top: 0; | ||
| } | ||
|
|
||
| > header:first-of-type { | ||
| height: 75px; | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| $.extend(true, doaj, { | ||
| util: { | ||
| clickToCopy: () => { | ||
| const copyBtn = ` | ||
| <button type="button" class="click-to-copy" aria-label="Copy value to clipboard"> | ||
| <i data-feather="copy" aria-hidden="true"></i> | ||
| <i data-feather="check" aria-hidden="true" style="display: none;"></i> | ||
| <span class="click-to-copy--confirmation" style="display: none;">copied</span> | ||
| </button> | ||
| `; | ||
|
|
||
| const onClick = function (event, $valueElem) { | ||
| if (!$valueElem.length) return; | ||
| const textToCopy = $valueElem.val() || $valueElem.text(); | ||
| const $btn = $(event.currentTarget); | ||
| const $msg = $btn.find('.click-to-copy--confirmation'); | ||
| const $copyIcon = $btn.find('.feather-copy'); | ||
| const $copiedIcon = $btn.find('.feather-check'); | ||
|
|
||
| navigator.clipboard.writeText(textToCopy) | ||
| .then(() => { | ||
| $btn.addClass('click-to-copy--clicked'); | ||
| $msg.show(); | ||
| $copyIcon.hide(); | ||
| $copiedIcon.show(); | ||
| setTimeout(() => { | ||
| $btn.removeClass('click-to-copy--clicked'); | ||
| $msg.hide(); | ||
| $copiedIcon.hide(); | ||
| $copyIcon.show(); | ||
| }, 3000); | ||
| }) | ||
| .catch(err => console.error('Failed to copy:', err)); | ||
| }; | ||
|
|
||
| $("[data-widget--click-to-copy]").each(function () { | ||
| const $element = $(this); | ||
| const $copyBtn = $(copyBtn); | ||
| $copyBtn[0].id = $element[0].id + '-copy'; | ||
| $copyBtn.attr('data-copy-target', $element[0].id); | ||
| $copyBtn.attr('aria-label', `Copy "${$element.val() || $element.text()}" to clipboard`); | ||
| $copyBtn.data('copyTarget', $element); | ||
| $element.after($copyBtn); | ||
| $copyBtn.on("click", (event) => onClick(event, $element)); | ||
| }); | ||
|
|
||
| } | ||
| } | ||
| }); | ||
|
|
||
| doaj.util.clickToCopy(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
portality/templates-v2/management/_application-form/includes/_fixed_header.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <div class="row"> | ||
| <div class="col-md-8 above_the_fold"> | ||
| <h1 class="above_the_fold--title">{% if obj.es_type == constants.ES_TYPE_JOURNAL %}Journal{% elif obj.application_type == constants.APPLICATION_TYPE_UPDATE_REQUEST %}Update Request{% else %}Application{% endif %}: <span id="above_the_fold__title" data-widget--click-to-copy>{{ obj.bibjson().title }}</span></h1> | ||
| <h2><a class="text-muted above_the_fold--url" id="above_the_fold__url" href='{{ obj.bibjson().journal_url }}' target="_blank" data-widget--click-to-copy>{{ obj.bibjson().journal_url }}</a></h2> | ||
| <p class="above_the_fold--issns"> | ||
| <span data-feather="book-open"></span> | ||
| {% if obj.bibjson().pissn %} | ||
| P: <span id="above_the_fold__pissn" data-widget--click-to-copy>{{ obj.bibjson().pissn }}</span> | ||
| {% if obj.bibjson().eissn %} | ||
| / | ||
| {% endif %} | ||
| {% endif %} | ||
| {% if obj.bibjson().eissn %} | ||
| E: <span id="above_the_fold__eissn" data-widget--click-to-copy>{{ obj.bibjson().eissn }}</span> | ||
| {% endif %} | ||
| </p> | ||
| </div> | ||
| {% if obj and (obj.es_type == constants.LOCK_JOURNAL and obj.is_in_doaj()) %} | ||
| <div class="col-md-4 align-right"> | ||
| <a class="button button--tertiary see_in_doaj" href="{{ url_for('doaj.toc', identifier=obj.id) }}" target="_blank">See this journal in DOAJ</a> | ||
| </div> | ||
| {% endif %} | ||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either this is form specific, in which case we should put it in
_application-form/includesor it isn't in which case we should rename it something more general, like_fixed_journal_header.htmlThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my screen this took up quite a lot of space at the top, and it was mostly empty whitespace. I'm not sure what the options are, perhaps just smaller, more compact fonts, or pulling everything onto one line so it takes the least amount of space possible?
Could also consider running the notes panel all the way to to the top anyway, to maximise the space for that? (if such a layout is possible)