Giter Club home page Giter Club logo

hydra-editor's People

Contributors

afred avatar atz avatar awead avatar barmintor avatar botimer avatar carolyncole avatar cbeer avatar cjcolvar avatar dchandekstark avatar flyingzumwalt avatar fnibbit avatar grosscol avatar hackartisan avatar hectorcorrea avatar jcoyne avatar jechols avatar jeremyf avatar jrgriffiniii avatar mjgiarlo avatar mkorcy avatar randalldfloyd avatar tpendragon avatar trmccormick avatar val99erie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hydra-editor's Issues

Empty fields are changed on save

If I have a record where some of the terms_for_editing are empty
And I edit the record, but do not enter values for the empty fields
Then hydra-editor creates an empty string values for those fields.

E.g., just showing the empty fields,

1.9.3-p327 :001 > item = Item.find('duke:3')
 => #<Item pid:"duke:3", contributor:[], coverage:[], language:[], publisher:[], relation:[], rights:[], source:[], subject:[]> 

[item edited with hydra-editor w/o changing data]

1.9.3-p327 :002 > item = Item.find('duke:3')
 => #<Item pid:"duke:3", contributor:[""], coverage:[""], language:[""], publisher:[""], relation:[""], rights:[""], source:[""], subject:[""]> 

IMO this is undesirable b/c it actually changes the object datastream, even if no changes were submitted.

First, I would like some agreement on the idea that hydra-editor should not do this -- that is, specifically, not set an empty string value on a field that is empty.

If there is agreement on that principle, I can work up a PR to address it.

The "add another" button UX is upside down

When you add another, you want to type into the newly created field (at the bottom) and then click the button next to it to add the next one. But that is a remove button, not an add button.
screen shot 2013-11-06 at 11 17 26 am

I think the way curate does it is better
screen shot 2013-11-06 at 11 14 50 am

Add support for Rails 6.0.z releases

Rails version 6.0.0 was released on 08/16/2019, and in accordance with the charter of the current phase of the Component Maintenance Working Group, the CircleCI configuration for this should be updated.

Support ActiveRecord?

This would definitely require some breaking changes in Controller behavior. Essentially, one would need more than the ID of the resource in order to query the proper table in https://github.com/samvera/hydra-editor/blob/master/lib/hydra_editor/controller_resource.rb#L3. This provides the resource for CanCan authorization, and there are tests which make it evident that no errors are thrown when the Class of the resource is not supplied in the HTTP request parameters: https://github.com/samvera/hydra-editor/blob/master/spec/controllers/records_controller_spec.rb#L132

These requests would need to fail unless the type parameter were provided so that https://github.com/samvera/hydra-editor/blob/master/lib/hydra_editor/controller_resource.rb#L8 will resolve.

Add Circle CI step that fails if branch name is master

Descriptive summary

This repository’s default branch has already been renamed to main using GitHub’s renaming tool. In order to preserve automatic redirection of links that reference the old branch name master to the new default main branch, a branch with the old name should not be recreated.

CircleCI can be used to prevent the recreation of the old default branch name by preventing PRs with a branch named master from being merged by causing a test failure during continuous integration.

Rationale

Git's default "master" branch derives from "master/slave" jargon which perpetuates systemic racist language and systems (see email Replacing "master" reference in git branch names). To uphold our Code of Conduct, we must move away from the term "master" in our technical language (as well as words like blacklist or whitelist).

Expected behavior

If a PR is submitted with a branch named master, the continuous integration tests should fail.

Actual behavior

If a PR is submitted with a branch named master, the continuous integration tests will not fail because of the branch name.

Related work

Background on the renaming effort is available in the working group notes.

Assets fail to compile

When precompiling assets for production use, the task fails with

Sass::SyntaxError: Undefined variable: "$border-radius-base".

Rails 4 build stopped working

Because the generator for Blacklight is not Rails 4 compatible. It makes versioned migrations which Rails 4 doesn't understand.

Revert deprecation of rendering views in app/views/records

If you have many types of objects, with common properties, it's nice that they can share partials in app/views/records of course hydra-editor should still use a more specific view if it is available.

Here is the warning:

DEPRECATION WARNING: Rendering view from `records/edit_fields/displays`. Move to tufts_audios/edit_fields/displays. This will be removed in 1.0.0. (called from render_edit_field_partial at /Users/justin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/hydra-editor-0.3.0/app/helpers/concerns/records_helper_behavior.rb:27)

Set focus to newly-added field

When keyboard user actives 'add' button, focus resets and you have to tab through the whole page again. It should go directly to the newly-added field so that the new data can be input. Another good option would be for it to stay on the button that was just activated.

Add support for Ruby 2.7.z releases

Ruby 2.7.0 was released on 12/25/2019, and in accordance with the charter of the current phase of the Component Maintenance Working Group, the CircleCI configuration for this should be updated.

$border-radius-base is undefined

I've got a vanilla Sufia install that I'm running under RAILS_ENV=production, and when I run the assets:precompile task, I see the following error:

mjg@beacon:~/workspace/druw (master[2.1.5@druw]⚡ )$ RAILS_ENV=production rake --trace assets:precompile
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
rake aborted!
Sass::SyntaxError: Undefined variable: "$border-radius-base".
  (in /home/mjg/.rvm/gems/ruby-2.1.5@druw/gems/hydra-editor-1.0.0.rc2/app/assets/stylesheets/hydra-editor/multi_value_fields.scss:35)
/home/mjg/.rvm/gems/ruby-2.1.5@druw/gems/hydra-editor-1.0.0.rc2/app/assets/stylesheets/hydra-editor/multi_value_fields.scss:35

I see that this variable is declared in bootstrap-sass 3.3.1.0 in assets/stylesheets/bootstrap/_variables.scss, and this version of bootstrap-sass is in my bundle, FWIW.

Fix SimpleForm support

Beginning with v3.5.1, Simple Form now requires models passed to it to conform to the ActiveModel interface; particularly, they must implement #to_model. #138 pins the dependency to avoid unexpected breakage in downstream apps.

Support for v3.5.1 and up should be re-added (this may just require testing/documentation fixes) and a major version released to get us back to tracking current simple_form development.

Error when trying to use an object's method to supply values to multi-value input

simple_form_for(foo), url: 'example.org' do |f|
  f.input :bar, as: :multi_value
end
# This will throw an error if Foo#bar exists, but bar is not an attribute on Foo.

Done when: you can create a MultiValueInput for the values from an an object's method (not just an attribute).

Our use case:

  • We have a custom input that extends MultiValueInput (similar to inputs in Hyrax).
  • We need to rearrange some of the object's terms into a different structure that is then passed to our custom input. We use an instance method to do this, but MultiValueInput currently only pays attention to attributes, not instance methods.

Set id to something unique when new fields are spawned

I'm not sure if it affects users in any tangible way, but right now adding multiple fields results in them all having the same ID. This will make testing a bit more painful, and I don't really know the ramifications of violating the HTML spec. id is supposed to be unique, but beyond testing I'm not sure if there are any actual problems.

In any case, if it's easy enough I'll try to throw together a PR to fix it, and if not, it's probably worth noting at least.

[ENTER] key not intuitive

The ENTER key effectively clicks the nearest button, rather than submitting the form. The nearest button may be "add" or "remove" depending if you're on the last item in a list.

For long forms, and/or people who prefer (or require) the keyboard, submitting the form is a bit annoying, and may result in accidental data deletion when hitting ENTER on a field. The default behavior of an HTML form is that hitting ENTER within most fields will submit the form.

Possibly relevant: http://stackoverflow.com/questions/8294465/making-enter-key-on-an-html-form-submit-instead-of-activating-button

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.