Skip to content

Name of command to edit cell #62

Closed

Description

@sophiajt

Our view of table data is read-only, but as we think about round-tripping with load/save, it would be helpful to be able to edit cells easily

Activity

  1. changed the title [-]Edit[/-] [+]Edit cell functionality[/+] on Jun 2, 2019
  2. sophiajt commented on Jun 2, 2019

    @sophiajt
    ContributorAuthor

    Example in practice:

    | edit package.version "1.3.2"
    

    The verb update is another possibility

  3. DanielRosenwasser commented on Aug 8, 2019

    @DanielRosenwasser

    I like update, but how do you get a handle to the larger structure being updated, as well as the current value?

  4. sophiajt commented on Aug 11, 2019

    @sophiajt
    ContributorAuthor

    @DanielRosenwasser - There are a couple convenience methods.

    To update, you'll need to take the whole structure in via the pipeline, and then have the user pass the field to update (you can see inc for an example of doing this)

    To get the current value at the given field path (taken from inc):

    value.item.get_data_by_path(value.tag(), field)
    

    And to update the value at the given field path:

    value.item.replace_data_at_path(value.tag(), field, replacement)
    

    The replace_data_at_path will replace the previous data with the new data and return the whole structure.

  5. rrichardson commented on Sep 4, 2019

    @rrichardson
    Contributor

    what about put as a verb for this? to complement get ?

  6. waldyrious commented on Sep 4, 2019

    @waldyrious
    Contributor

    what about put as a verb for this? to complement get?

    Another option could be set.

  7. sophiajt commented on Sep 5, 2019

    @sophiajt
    ContributorAuthor

    Now that we have edit as the feature, we may want to change this to figuring out the name for it.

  8. changed the title [-]Edit cell functionality[/-] [+]Name of command to edit cell[/+] on Sep 5, 2019
  9. removed
    good first issue
    on Sep 5, 2019
  10. rrichardson commented on Sep 5, 2019

    @rrichardson
    Contributor

    When it comes to changing the values within an existing column of a table, "edit" makes sense.
    I think set makes sense as well and it's a bit shorter.

  11. strega-nil commented on Sep 5, 2019

    @strega-nil
    Contributor

    I think update makes the most sense, as in "functional record update", since one is not actually modifying any fields. edit, set, and put are all (at least, more) implicative of modification.

  12. wycats commented on Sep 10, 2019

    @wycats
    Contributor

    I think update is pretty nice, and makes sense both in programming terms and in human terms.

  13. waldyrious commented on May 16, 2020

    @waldyrious
    Contributor

    For future reference, edit was renamed to update in #1724 (released in nu 0.14.0).

  14. added a commit that references this issue on Feb 7, 2022
  15. added a commit that references this issue on Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions