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

Improvements to suggested and archive URLs when editing a mapping [60838740] #83

Merged
merged 11 commits into from
Nov 25, 2013

Conversation

fofr
Copy link
Contributor

@fofr fofr commented Nov 22, 2013

  • Archive and suggested URLs are secondary fields that rarely need to be filled in, move them behind a disclosure to avoid confusion
  • Introduce text that explains the meaning of both URL types, with appropriate link text to disclose the fields
  • Use cancel or remove to switch the view back and reset the field
  • Default to showing the fields when they are present
  • Switch labels for read only fields to a key-value definition list that simulates label styles
  • Introduce a mappings helper to create national archive URLs
  • When JS is disabled, show all form values and separate the form with visible legends, and hide JS interactions
  • There is a known caveat that if the default host is wrong the national archive link may not work and that the fix isn’t clear to the user
  • Cleanup some of the base styles to use more of the bootstrap defaults
  • Change how we deal with the non-javascript case so we have hooks for JS enabled and disabled

Paul Hayes added 9 commits November 22, 2013 11:10
* Use larger bootstrap defaults
* Make the date human readable
* Return a copyable version that can be pasted into a National archive
URL
* Refactor the redirect-to-link class for wider use
* Add to the style guide
* We can use bootstrap’s mute instead
* Avoid repaints by toggling JS class before CSS has loaded
* Use a class for enabled and disabled
* Use minified inline JavaScript instead
* This also mimics the Modernizr approach
* Separate into sections with comments
* Include content toggle classes
* Remove body and pre styles that aren’t being used, or are met by
bootstrap defaults
* Archive and suggested URLs are secondary fields that rarely need to
be filled in, move them behind a disclosure to avoid confusion
* Introduce text that explains the meaning of both URL types, with
appropriate link text to disclose the fields
* Use cancel or remove to switch the view back and reset the field
* Default to showing the fields when they are present
* Switch labels for read only fields to a key-value definition list
that simulates label styles
* Introduce a mappings helper to create national archive URLs
* When JS is disabled, show all form values and separate the form with
visible legends, and hide JS interactions
* Behaviour when creating mapping still TBD
* There is known caveat that if the default host is wrong the national
archive link may not work and that the fix isn’t clear to the user
* We can’t show a national archive link until the mapping path is
canonicalised
* Hide the TNA link and alternative field
* We are now using bootstrap default font-size and line-height
@jamiecobbett
Copy link
Contributor

This looks awesome, good work :)

@@ -54,6 +54,21 @@ def mapping_edit_tabs(options = {})
end

##
# Generate national archive index URL
def national_archive_index_url(mapping)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if these two methods really belong in the model layer? Two reasons:

  • I think it is probably a model concern
  • It would be good to eventually share this code with bouncer, and sharing models (via a gem) is probably how we'd do that

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a chat with @rgarner and @fofr, he's going to move these methods to the model.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Methods moved.

Paul Hayes added 2 commits November 25, 2013 10:43
* Replace example_url, national_archive_url and
national_archive_index_url
* Use a terser test format
rgarner added a commit that referenced this pull request Nov 25, 2013
Improvements to suggested and archive URLs when editing a mapping [60838740]
@rgarner rgarner merged commit d76b806 into master Nov 25, 2013
@rgarner rgarner deleted the edit-mapping-improvements branch November 25, 2013 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants