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 table widget #99997

Closed
isidorn opened this issue Jun 12, 2020 · 5 comments
Closed

Support table widget #99997

isidorn opened this issue Jun 12, 2020 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan table-widget
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Jun 12, 2020

On top of the list widget we should build a table widget.
Same as the list it should be virtual and accessible.

Use cases:

  • tabular variables view for debug
  • ports view for remote
  • problems view
@isidorn isidorn added the feature-request Request for new features or functionality label Jun 12, 2020
@isidorn isidorn added this to the June 2020 milestone Jun 12, 2020
@isidorn isidorn self-assigned this Jun 12, 2020
@isidorn
Copy link
Contributor Author

isidorn commented Jun 26, 2020

Did not have cycles for this feature request this milestone.
Moving to August, since in July I am on vacation.

@joaomoreno bounced some ideas off me, but I did not get any further. For now pasting ideas here

/**
 1. use the listview to render a table in which every column has the same width
 2. have the header row be a splitview widget acting as a single point of truth for column sizes and have dynamically genereated CSS which reflects those sizes, such that element rows can adapt to them
 3. think about all widget features: focus, selection, keyboard & mouse, accessibility, themeing
 */
Trees                    TableWidget
|                        |
         ListWidget
|
ListView - engine virtualization
// idea
table.model
table.columns
// API spec
interface Column<T, R> {
  readonly label: string;
  readonly weight: number;
  readonly renderer: IListRenderer<R>;
  project(element:T): R;
}
declare class Table<T> {
  splice(index: number, deleteCount: number, ...insert: T[]): T[];
  get columns(): Column<T, any>[];
  set columns(columns: Column<T, any>[]);
  setSelection(selection: { element: T, column: number }[]): void;
  getSelection(): { element: T, column: number }[];
}
// example
const nameColumn = {
  label: 'Name',
  renderer
  project(el) {
    return el.name;
  }
}
const model = [
  { name: 'fibonacci', type: 'ndarray' },
  { name: 'inxed', type: 'ndarray' },
  { name: 'msg', type: 'ndarray' },
  { name: 'n', type: 'ndarray' },
  { name: 'x', type: 'ndarray' }
];
// rendering
CSS
.table-col[data-col="1"] { width: 100px; }
.table-col[data-col="2"] { width: 150px; }
.table-col[data-col="3"] { width: 200px; }
<div class="list-row">
  <div class="table-row">
    <div class="table-col" data-col="1">CONTENTS</div>
    <div class="table-col" data-col="2"></div>
    <div class="table-col" data-col="3"></div>
  </div>
</div>

@isidorn isidorn modified the milestones: June 2020, August 2020 Jun 26, 2020
@isidorn isidorn modified the milestones: August 2020, Backlog Aug 14, 2020
@isidorn
Copy link
Contributor Author

isidorn commented Sep 8, 2020

Due to the change in plans we do not plan to tackle this. Thus closing this as out of scope

@isidorn isidorn closed this as completed Sep 8, 2020
@heartacker
Copy link
Contributor

why?

Due to the change in plans we do not plan to tackle this. Thus closing this as out of scope

@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2020
@egamma egamma reopened this Feb 7, 2021
@egamma egamma assigned joaomoreno and unassigned isidorn Feb 7, 2021
@egamma egamma modified the milestones: Backlog, February 2021 Feb 7, 2021
@joaomoreno
Copy link
Member

a8a04eb

@joaomoreno
Copy link
Member

Marking this on-testplan due to Ports view.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan table-widget
Projects
None yet
Development

No branches or pull requests

4 participants