trimble-oss / modus-web-components

This library provides Modus components as web components - reusable, encapsulated UI elements that are framework agnostic (can be implemented in any site).
https://modus-web-components.trimble.com/
MIT License
34 stars 70 forks source link

Table method getEditableCell unclear #2990

Open kuhnboy opened 5 days ago

kuhnboy commented 5 days ago

Prerequisites

Describe the issue

In the storybook documentation, getEditableCell description is:

Handle the editability of a specific cell.

It appears after searching I was able to find the intent of the method: #2541

The documentation needs to be improved (or method name changed) to be more clear such as: "Put the cell in edit mode".

If I look at the code, the comment is even more confusing for 'getEditableCell':

/**
   * Returns whether a cell is editable based on row index and column ID.
   * @param rowIndex The index of the row.
   * @param columnId The ID of the column.
   * @returns Boolean indicating if the cell is editable.
   */

But the function has no return value:

async getEditableCell(rowIndex: string, columnId: string): Promise<void> {
...
    await cellToEdit.handleCellEdit(rowIndex, columnId);
  }

I suggest there be a better name for this method like: 'editCell' as 'get' is inappropriate as its not getting anything.

Reduced test cases

No response

What operating system(s) are you seeing the problem on?

No response

What browser(s) are you seeing the problem on?

No response

What is the issue regarding ?

@trimble-oss/modus-web-components

What version of npm package are you using ?

0.41.1

Priority

Low

What product/project are you using Modus Components for ?

Trimble Unity

What is your team/division name ?

O&PS

Are you willing to contribute ?

None

Are you using Modus Web Components in production ?

No response

github-actions[bot] commented 5 days ago

Hello @kuhnboy! Thanks for opening an issue. The Modus core team will get back to you soon (usually within 24-hours) and provide guidance on how to proceed. Contributors are welcome to participate in the discussion and provide their input on how to best solve the issue, and even submit a PR if they want to.

Please wait until the issue is ready to be worked on before submitting a PR, or you can reach out to the core team if it is time bound. For trivial things, or bugs that don't change the expected behaviors and UI, you can go ahead and make a PR.