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

Support view / edit of data package metadata #852

Closed
JDziurlaj opened this issue Oct 12, 2018 · 10 comments
Closed

Support view / edit of data package metadata #852

JDziurlaj opened this issue Oct 12, 2018 · 10 comments
Labels
est:Moderate Moderate effort to implement est:Score=5 Score for estimate of effort required (scale of 1 upwards) f:Feature-request This issue is a request for a new feature fn:Set-Properties support:Approved Approved to be done under the support agreement support This issue is a candidate to complete under the support agreement

Comments

@JDziurlaj
Copy link

Right now, the sidebars for datapackage metadata (i.e. Table, Provenance, Package) display content as form fields, making editing very simple. However, if the metadata is being used for reference purposes, for example, to ensure entered data meets an already defined schema, then a more static view might be preferable.

Desired Behaviour (for feature requests only)

  1. Render sidebars as static content by default
  2. Add a edit button that will toggle between the two views

Our goal is to provide the tableschema to the user, and allow them to fill out the data, using the sidebars as a reference.

@ghost
Copy link

ghost commented Oct 16, 2018

Hi @JDziurlaj
Not sure I've understood correctly, but is the change to allow for a read-only view vs edit view? And if so, what's the gain by providing the read-only view?

@JDziurlaj
Copy link
Author

I understand this might be an break from the expected workflow for data-curator, but basically we have a tableschema that is fixed (and provided by us), that various producers are expected to provide data in. In this case, we would like to discourage the modification of the tableschema using related functions in the tool, as they will no longer be validating against our format.

@ghost
Copy link

ghost commented Oct 16, 2018

HI @JDziurlaj
So this is a tableschema, that isn't frictionless, but a different standard?
Not sure how much capacity is available atm to perform this work, but is it specific behaviours/menu button/clicks that you want disabled? Sorry to keep asking, but the more I can understand, the better chance I have of working out the simplest/quickest way forward if possible - it also means that if there is support for others who want similar behaviour, we can make the changes as generic as possible.
I'm thinking that you don't want function/buttons like:

  • Guess Column Properties
  • Validate
  • And then certain behaviours/messages that you see in 'Table Properties'/Column Properties for example (which I'll be able to determine then what could be turned on/off), or metadata that is added when exporting/importing, through interacting with frictionless' tableschema.js and data-package.js libraries.
    If this more what you're after (feel free to add screenshots, wireframes, images if you think I'm not getting it 😛 )?

@JDziurlaj
Copy link
Author

JDziurlaj commented Oct 18, 2018

Hi @mattRedBox,

The tableschema in question is just an instance / descriptor of frictionless standard which we have crafted ourselves. It complies with their format and can be validated by the tableschema-js tool. We would want to disallow any modifications to the /resources/schema portion of the datapackage. From what I can tell this would mean:

  • Disabling:
    • Guess button / Tools pulldown
    • Insert column before
    • Insert column after
    • Remove column(s)
  • Make column sidebar read only

This mode could be toggled by adding a menu item called "lock columns" or something similar. Validation is a key function we want, so that shouldn't be disabled.

Here is the workflow we are trying to support:

  1. Jurisdiction collects data from local system, assembles it into a CSV.
  2. Jurisidction opens data-curator.
  3. Jurisdiction opens the CSV. They are prompted to select an existing tableschema to validate against.
  4. Jurisdiction can Validate their file against the tableschema, make corrections in the data-curator interface.
  5. Jurisdiction publishes validated datapackage.

I've developed an extension to datacurator to handle (3). This workflow is very similar to what XML validation tools provide, where a user can validate against a XML Schema (XSD). In this case we are just extending this scenario to support tabular data.

@ghost
Copy link

ghost commented Oct 19, 2018

Hi @JDziurlaj
Ok, sounds simpler than I first thought - thanks for clarifying.
In your point: 'Make column sidebar read only', do you mean just the 'Column Properties', or all of the Side navigation flyout panels (both LHS and RHS)? This is the one that might take a bit of time (just with juggling other commitments), but still doable I think.

@ghost ghost added the f:Feature-request This issue is a request for a new feature label Oct 19, 2018
@JDziurlaj
Copy link
Author

Hi @mattRedBox,

I was referring to the sidebar (RHS) that comes out when the Column icon is clicked.

@ghost
Copy link

ghost commented Oct 23, 2018

OK so just the Column Properties then (not Table, Package and others).

@ghost ghost added the support This issue is a candidate to complete under the support agreement label Jan 31, 2019
@ghost ghost added the priority:Low label May 29, 2019
@Stephen-Gates Stephen-Gates added this to the Support release milestone May 30, 2019
@Stephen-Gates
Copy link
Contributor

I really like this idea and I think @JDziurlaj has nailed the spec.

For clarification...

Add Import Column Properties to the File menu that allows a table schema JSON file to be opened from a URL or local file.

Add a Lock Column Properties checked menu item in Tools that is set per Data Tab to enable:

  • the Column Properties to be edited/read only
  • menu and toolbar items dis/enabled.

On selecting Import Column Properties:

  • check the Lock Column Properties menu item
  • fill the Column Properties from the JSON file and make them read only
  • Disable the menu and toolbar items

My question is what happens when the number of columns in the CSV and Table Schema are not equal? We may need some extra validation because at the moment these can't be different.

@markwheels markwheels added support:Approved Approved to be done under the support agreement and removed priority:7 support:Approved Approved to be done under the support agreement labels May 31, 2019
@markwheels markwheels added the support:Approved Approved to be done under the support agreement label Jun 7, 2019
@ghost ghost added the est:Major Major effort to implement label Jun 18, 2019
@ghost
Copy link

ghost commented Jun 18, 2019

Hi @markwheels
The summary by @Stephen-Gates, if this is the way it is to work, involves more than just making columns/menus read-only. I'll split out the import column properties, validation to another issue. That will bring the estimate for this down (I'll adjust this estimate once I've moved this other work out to another issue).
So moving forward, will just keep the disabled/locked part of this work in this ticket.

@ghost ghost added est:Moderate Moderate effort to implement est:Score=5 Score for estimate of effort required (scale of 1 upwards) and removed est:Major Major effort to implement labels Jun 19, 2019
ghost pushed a commit that referenced this issue Jun 27, 2019
ghost pushed a commit that referenced this issue Jun 27, 2019
…ngeoftab and locks for current tab. Sends menu lock notice from both.
ghost pushed a commit that referenced this issue Jun 27, 2019
ghost pushed a commit that referenced this issue Jun 27, 2019
…rformed after activeTab, then active Hot Id captured. Removed debug logging.
ghost pushed a commit that referenced this issue Jun 27, 2019
ghost pushed a commit that referenced this issue Jun 27, 2019
@ghost ghost closed this as completed in 411fcbb Jun 28, 2019
@Stephen-Gates
Copy link
Contributor

@mattRedBox Oversight on my part! If you want to lock the Table Schema then Primary and Foreign Keys and Missing Values in Table Properties also need to be made readonly

@ghost ghost mentioned this issue Jul 2, 2019
ghost pushed a commit that referenced this issue Apr 21, 2021
ghost pushed a commit that referenced this issue Apr 21, 2021
…ngeoftab and locks for current tab. Sends menu lock notice from both.
ghost pushed a commit that referenced this issue Apr 21, 2021
ghost pushed a commit that referenced this issue Apr 21, 2021
…rformed after activeTab, then active Hot Id captured. Removed debug logging.
ghost pushed a commit that referenced this issue Apr 21, 2021
ghost pushed a commit that referenced this issue Apr 21, 2021
ghost pushed a commit that referenced this issue Apr 21, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
est:Moderate Moderate effort to implement est:Score=5 Score for estimate of effort required (scale of 1 upwards) f:Feature-request This issue is a request for a new feature fn:Set-Properties support:Approved Approved to be done under the support agreement support This issue is a candidate to complete under the support agreement
Projects
None yet
Development

No branches or pull requests

3 participants