Giter Club home page Giter Club logo

ng-core's Introduction

Build Status npm version Translation status

RERO angular core library

Documentation available on this page.

ng-core's People

Contributors

benerken avatar blankoworld avatar garfield-fr avatar jma avatar lauren-d avatar pascalrepond avatar rerowep avatar transifex-integration[bot] avatar vgranata avatar weblate avatar zannkukai avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ng-core's Issues

No request button in detailed view

Describe the issue
There is no 'request' button in the item detailed view.

To Reproduce
N/A

Expected behavior
An optional 'request' button should be added to the detailed view. When a request is done, the delete button should be disabled.

EDIT: better to generalize the behaviour so that any needed button can be added.

Software version
v0.0.33

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Changing the number of results fire two REST requests

Describe the issue
Changing the number of results fire two REST requests (see network in the debug mode)

To Reproduce
Steps to reproduce the behavior:

  1. Do a search in admin app.
  2. Change the number of displayed results.
  3. Check network in debug mode.

Expected behavior
Only one request.

Software version
v0.0.3

Translations extractor

Implement a script which is able to extract all translations in files and put them in json files. See RERO ILS ui app for a working example.

Multiple languages support

Describe the issue
The project needs a way to support more i18n languages, and to configure which ones a specific instance will need.

Expected behavior
This should help projects like rero-ils-ui or sonar-ui to support more languages.

Additional context
When resolving this issue, the translated files in rero-ils-ui for Spanish, Arabic and Dutch, should be produced and synchronized to transifex, in order to recycle the existing translations in rero_ils/ui or on transifex.

Object data are not cleaned correctly when the property is removed

Describe the issue
When a document is saved with a required property, when we edit the document and the property is no more required and removed from editor, some data are kept when saving the document.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the document editor on sonardev.test.rero.ch
  2. Create a document with type Preprint and fill provisionActivity field with a start date.
  3. Edit the document and change the document type for Conference poster.
  4. Remove the provisionActivity property from editor.
  5. Try to save the document, a bad request is thrown from server.

Expected behavior
When the data are posted, they must not contain the provisionActivity field.

Screenshots
provision_activity

Read-only properties are changeable in editor

Describe the issue
If an enum field is marked as read-only, the value can still be changed.

To Reproduce
Add this kind of property:

"readonly_changeable": {
    "title": "[issue] Readonly value changeable",
    "description": "Readonly values must not be changeable.",
    "type": "string",
    "default": "Value 1",
    "readOnly": true,
    "enum": [
        "Value 1",
        "Value 2"
    ]
}

Tooltips are sometimes displayed twice

Describe the issue
In certain circumstances, tooltips are displayed twice on editor field mouse over. The issue has been seen in a SONAR editor.

To Reproduce

  1. Put a description in a field of type array of strings like this:
"specificCollections": {
    "title": "Specific collections",
     "description": "The names of the organisation's specific/patrimonial collections to which this document belongs",
     "type": "array",
      "items": {
            "type": "string",
            "minLength": 1
      }
}
  1. Go to the editor and mouse over the field.

Expected behavior
On mouse over, only one tooltip must be displayed.

Screenshots
Capture d’écran 2020-06-24 à 14 09 04

Additional context
SONAR deposit editor.

Detail view component doesn't listen to changes in url

Describe the issue
When the url is changed from a detail component, the content is not updated excepted if we reload the application.

To Reproduce
Steps to reproduce the behavior:
In rero-ils-ui

  1. Log in as a librarian
  2. Go to a library detail view, different to My library
  3. Go to Admin & Monitoring > My library
  4. The URL is correct but not the information displayed

Expected behavior
The content of the view should match the corresponding url.

Software version
cb1af09
rero/rero-ils-ui@2cd145c

Simple properties in lists are never validated

Describe the issue
With a list of a simple property, this property is not validated, even with a pattern.

To Reproduce
Check this kind of property:

"simple_not_required": {
    "title": "[issue] Simple element of list are not required.",
    "description": "Simple element must not pass the validation if they are required and empty.",
    "type": "array",
    "minItems": 1,
    "items": {
        "title": "Item",
        "type": "string",
        "pattern": "^.+$",
        "minLength": 1
    }
}

result counter use plural even if search return only 1 result

Describe the issue
On a search interface, if the query return only 1 result, the result counter display "1 results" (using the plural).

Expected behavior
Result counter should be singular if only 1 result is returned.

Software version
1.0.0

Screenshots
image

Permissions pages creation

Describe the issue
It would be great to add default pages for 4xx and 5xx sever status. An additional configuration can be added to have the possibility to overwrite the default pages.

The editor should be adapted accordingly.

To Reproduce
Steps to reproduce the behavior:

  1. Try to edit a resource that you do not have the right.
  2. The browser is redirected to the previous URL.

Expected behavior
An permission denied page is displayed.

Software version
Tell us which version you're using:

  • dev mode with the master version of ng-core

Note
Similar pages has been created to the rero-ils-ui. For the page redirection in rero-ils-ui we use guards.

Hidden subfield is not selectable

Describe the issue
Following this structure:

"publication": {
    "title": "Publication",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "startDate": {
            "title": "Start date",
            "type": "string",
            "minLength": 1,
            "form": {
                "hide": true
            }
        },
        "statement": {
            "title": "Statement",
            "type": "string",
            "minLength": 1
        }
    }
}

The startDate field is not displayed by default in the editor, but could be selectable in the dropdown after the parent's label. The dropdown appears well, but contains nothing.

To Reproduce
Steps to reproduce the behavior:

  1. Go to document's editor in SONAR https://sonardev.test.rero.ch/manage/records/documents/new.
  2. Choose Book chapter for document type.
  3. Go to Contained in (host document) section.
  4. Click the dropdown after Publication.
  5. The dropdown is empty.

Expected behavior
The dropdown must contain the choice for adding field Start date.

Screenshots
Capture d’écran 2020-08-31 à 13 03 37

Remove unnecessary record property in detail component

Describe the issue
"record" property is not necessary in DetailComponent. The use of async pipe is better.

TODO:

  • Remove record property in DetailComponent (and use async pipe).
  • Remove record property in JsonComponent (and use async pipe).
  • Possibly change behavior in ng-core-test.

"start" and "end" arguments are not use in TimeValidator.greaterThanValidator

Describe the issue
The start and end arguments of the TimeValidator.greaterThanValidator are not use to validate data.
Instead of this, the validator get the content of static 'start_date' and 'end_date' field

static greaterThanValidator(start: string, end: string): ValidatorFn {

Expected behavior
Validator arguments should be used

Software version
v1.0.0

Error after records creation

Describe the issue
Sometimes after records creation, an error appears after redirection, instead of showing the record details.

To Reproduce
Steps to reproduce the behavior:

  1. Login as an administrator.
  2. Go to Admin -> Records -> Users.
  3. Click Add button.
  4. Fill the form.
  5. Save user.
  6. Repeat 1-5 steps if error doesn't appear.

Expected behavior
After redirection, the record details must be displayed, not an error.

Pagination issues

  • Current page is not highlighted when page is refreshed in browser
  • Disable click in active page

group property for options in select are not displayed anymore

Describe the issue
If a group is specified in the JSON schema, the options have to be grouped by this group when rendering the select box. It was the case, but a recent PR broke this behavior.

To Reproduce

  1. Go to the editor in sonardev.test.rero.ch.
  2. In the language select box, the first four options must be separated from others.

Expected behavior
A separator representing the group have to be displayed after the fourth options (preferred languages).

Screenshots
preferred_languages

Additional border is displayed for object types

Describe the issue
Following this property example:

"editionStatement": {
    "title": "Edition",
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "editionDesignation": {
            "title": "Designation",
            "type": "object",
            "properties": {
                "value": {
                    "title": "Value",
                    "type": "string",
                    "minLength": 1
                }
            },
            "required": [
                "value"
            ]
        },
        "responsibility": {
            "title": "Responsibility",
            "type": "object",
            "properties": {
                "value": {
                    "title": "Value",
                    "type": "string",
                    "minLength": 1
                }
            },
            "required": [
                "value"
            ]
        }
    },
    "required": [
        "editionDesignation"
    ],
    "form": {
        "hide": true,
        "navigation": {
            "essential": true
        },
        "templateOptions": {
            "cssClass": "editor-title"
        }
    }
}

The editor-title CSS class is added twice in the HTML, causing an extra border in the property.

To Reproduce

  1. Go to SONAR document's editor https://sonardev.test.rero.ch/manage/records/documents/new.
  2. Add the Edition field.
  3. A border is surrounding the Edition properties.

Expected behavior
The additional border must not be displayed. In other word, the editor-title class must be added only one time.

Screenshots
Capture d’écran 2020-08-31 à 13 29 41

Observables for permissions checks

The functions that control permissions to add, edit or delete a resource must return an observable.

In addition, it is necessary to add a control on the possibility of listing records and seeing the details of a record.

Switches don't work in editors

Describe the issue
The switches don't work anymore in editors. It's impossible to change the state of the field.

To Reproduce

  1. Go to any editor containing a switch.
  2. Try to change the state.
  3. Nothing happens.

Expected behavior
State of the field must change when clicking on the switch.

Software version
This problem seems appearing since this commit 87e51ef.

Remove icon detail

Remove icon detail because the link is put on the title of the record.

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.