200ok-ch / organice

An implementation of Org mode without the dependency of Emacs - built for mobile and desktop browsers
https://organice.200ok.ch/
GNU Affero General Public License v3.0
2.45k stars 154 forks source link

Table add/remove button inverted #1001

Open m0rp30 opened 2 weeks ago

m0rp30 commented 2 weeks ago

Describe the bug In the demo live version the button to add/remove row and columns are inverted.

To Reproduce Steps to reproduce the behavior:

  1. Click in the button add column
  2. The app add row

Same for add row, del colum, del row

Screenshots 2024-11-12-15:37:05-screenshot

m0rp30 commented 2 weeks ago

I supose the simplie way for a solution is to invert row and column in to the file src/components/OrgFile/components/TableEditorModal/components/TableActionButtons/index.js like as the following lines:

<div
              className="table-action-drawer__sub-icon-container"
              onClick={() => (selectedTableCellId ? onAddNewTableColumn() : undefined)}
            >
              <i className="fas fa-plus fa-lg table-action-drawer__main-icon" />
              <i className="fas fa-columns fa-sm table-action-drawer__sub-icon table-action-drawer__sub-icon--rotated" />
            </div>

            <div
              className="table-action-drawer__sub-icon-container"
              onClick={() => (selectedTableCellId ? onRemoveTableCloumn() : undefined)}
            >
              <i className="fas fa-times fa-lg table-action-drawer__main-icon" />
              <i className="fas fa-columns fa-sm table-action-drawer__sub-icon table-action-drawer__sub-icon--rotated" />
            </div>

            <div
              className="table-action-drawer__sub-icon-container"
              onClick={() => (selectedTableCellId ? onAddNewTableRow() : undefined)}
            >
              <i className="fas fa-plus fa-lg table-action-drawer__main-icon" />
              <i className="fas fa-columns fa-sm table-action-drawer__sub-icon" />
            </div>

            <div
              className="table-action-drawer__sub-icon-container"
              onClick={() => (selectedTableCellId ? onRemoveTableRow() : undefined)}
            >
              <i className="fas fa-times fa-lg table-action-drawer__main-icon" />
              <i className="fas fa-columns fa-sm table-action-drawer__sub-icon" />
            </div>
          </div>