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

Custom facet names #1011

Open
esiegerman opened this issue Jun 26, 2015 · 7 comments · May be fixed by #5759
Open

Custom facet names #1011

esiegerman opened this issue Jun 26, 2015 · 7 comments · May be fixed by #5759
Assignees
Labels
design proposal needed a precise proposal for a user interface for this feature would be welcome facets Behaviour or rendering of facets in a project Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. Type: Feature Request Identifies requests for new features or enhancements. These involve proposing new improvements.

Comments

@esiegerman
Copy link

It would be great if one could give a facet a custom name. This would help immensely when there are multiple facets against the same column, for example.

(This is related to #575 and #745, but not identical to either of them.)

@magdmartin
Copy link
Member

I keep supporting this suggestion.

@magdmartin magdmartin added Type: Feature Request Identifies requests for new features or enhancements. These involve proposing new improvements. Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. labels Jul 22, 2015
@thadguidry
Copy link
Member

thadguidry commented Feb 29, 2020

I think something like this functionality would work well:

  1. allow a user to click on the titleSpan.text on a Facet and update its config.name.
  2. allow a user to hover on the Facet titleSpan.text and see the original column name on the hover event that would show "Column: " + config.columnName

Alternatively, we could keep config.name and just introduce a config.label but then checking if config.label != "none" and replacing the elmt would have to be done and the code and JSON object already store the

  • config.name
  • config.columnName
  • config.expression

so yeah, it looks like config.name is actually treated as a label already. But I leave the decision to the HTML CSS gods because I know they love clean separation of names and labels. (which is a good reason for Vue components, it drives this best practice by design)

@thadguidry thadguidry added the facets Behaviour or rendering of facets in a project label Feb 29, 2020
@antoine2711
Copy link
Member

Here's a VERY simple implementation of renaming a facet. Could be added in v3.4 as it's so simple.
PR #2767

Regards,
Antoine

@thadguidry
Copy link
Member

thadguidry commented Jun 21, 2020

Hmm, I think I view this differently now. After seeing lots of overlapping issues regarding "remembering things" for Facets and Columns. For users, this would be exposed as metadata in various places of OpenRefine.

@antoine2711 I think what the issue was asking was pertaining to temporary metadata. Primarily, tons of folks want to see not only "name", but also "title" and "descriptor" at a minimum for Facets and Columns.

I would not put a lot of emphasis on what I suggested earlier above in #1011 because I've learned that the real use cases are more about metadata in a lot of places of OpenRefine that users want to edit and store to avoid ambiguity and remember things, especially when sharing but also while exploring their data.

And so we should probably re-design the approach in this issue #1011

Imagine:

  1. A user can give alternative titles to Facets. (and be able to save that info as part of exporting and sharing a project)
  2. A user can give alternative titles to Column names. (the metadata and saving and exporting)

We can't do that currently.
From the Frictionless Data Specs - Table Schema

"fields": [
    // a field-descriptor
    {
      "name": "name of field (e.g. column name)",
      "title": "A nicer human readable label or title for the field",
      "type": "A string specifying the type",
      "format": "A string specifying a format",
      "description": "A description for the field"
      ...
    },

IF using only the frontend, you can expose the temporary solution that a "title" on a facet can be set, while holding on to the original "name" of the column, that that's what I see #1011 as asking for.

"name", <-- we have this now
"title" or "label" <-- currently, we cannot set this on Facets and give it visibility in place of the "name", but also being able to see the original "name" if they hover over it.

Later I would like to be able to save that info permanently and have it persist with the project.
But I think @wetneb might prefer that this issue wait a bit until the backend work for metadata can work with your frontend changes? But if a temp solution can be had, that does not persist for now, then it would still be useful. But it really needs to persist as part of introducing metadata support throughout OpenRefine where it makes sense, IMHO :-)

@antoine2711
Copy link
Member

But if a temp solution can be had, that does not persist for now, then it would still be useful.

Yes, that what PR #2767 is, a partial and simple feature to edit the volatile facet's name.

I also see the persistance necessity, and the rest. I agree we should look to go in that direction.

Regards,
Antoine

@esiegerman
Copy link
Author

IF [...] you can expose the temporary solution that a "title" on a facet can be set, while holding on to the original "name" of the column, that that's what I see #1011 as asking for.

Yes, that's all I wanted.

I wasn't thinking in terms of persisting the title -- but then, I wasn't thinking in terms of persisting facets at all. If OpenRefine can now do that, the title should of course be included.

@antoine2711
Copy link
Member

@esiegerman : you can try it, it should work well.

Regards,
Antoine

@antoine2711 antoine2711 self-assigned this Apr 3, 2022
@wetneb wetneb added the design proposal needed a precise proposal for a user interface for this feature would be welcome label Mar 7, 2023
@antoine2711 antoine2711 linked a pull request Mar 31, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design proposal needed a precise proposal for a user interface for this feature would be welcome facets Behaviour or rendering of facets in a project Module: Frontend These issues involve working on HTML, CSS, and JavaScript code that affects the user interface. Type: Feature Request Identifies requests for new features or enhancements. These involve proposing new improvements.
Projects
Status: Done
5 participants