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

Implement adding a new column #495

Closed
Tracked by #327
kgodey opened this issue Jul 28, 2021 · 9 comments · Fixed by #540
Closed
Tracked by #327

Implement adding a new column #495

kgodey opened this issue Jul 28, 2021 · 9 comments · Fixed by #540
Assignees
Labels
ready Ready for implementation work: frontend Related to frontend code in the mathesar_ui directory

Comments

@kgodey
Copy link
Contributor

kgodey commented Jul 28, 2021

Problem

Users might want to add a new column to their table. Users would also want to resize the column widths.

Proposed solution

Adding a column

The "Working with Columns" design spec has a solution for adding a new column, which we need to implement on the frontend.

Additional context

@kgodey kgodey added this to the 06. Working with Tables milestone Jul 28, 2021
@kgodey kgodey added ready Ready for implementation type: enhancement work: frontend Related to frontend code in the mathesar_ui directory labels Jul 28, 2021
@pavish pavish changed the title Implement adding a new column Implement adding a new column, resizing columns Aug 3, 2021
@pegnott
Copy link
Contributor

pegnott commented Aug 4, 2021

Hello! I can help with this.

@kgodey
Copy link
Contributor Author

kgodey commented Aug 4, 2021

Thanks @pegnott! Assigned to you.

@pegnott
Copy link
Contributor

pegnott commented Aug 5, 2021

I will be getting started on this tonight or tomorrow and will comment with status updates as they are pertinent. Thanks!

@kgodey
Copy link
Contributor Author

kgodey commented Aug 6, 2021

Sounds good, @pegnott! Please let us know if you have questions along the way.

@pegnott
Copy link
Contributor

pegnott commented Aug 9, 2021

Here's what's done so far and where you can check it out:

  • ui/src/stores/TableData.ts: added addColumn function
  • ui/src/sections/table-view/TableView.svelte: added columnAdd func
  • ui/src/sections/table-view/Header.svelte: add UI for basic column creation

My forked branch:
https://github.com/pegnott/mathesar/tree/add_column

Still to do:

  • open/close state on add_column dropdown
  • add UI for other column values (currently hardcoding type to varchar)
  • adjustments to UI for table name restrictions
  • style tweaks as needed once all functionality / ui elements are all in place

@kgodey
Copy link
Contributor Author

kgodey commented Aug 9, 2021

Thanks @pegnott! Feel free to open a draft pull request whenever you'd like feedback.

@pegnott
Copy link
Contributor

pegnott commented Aug 18, 2021

Am in the final stretch, switching the initial resize implementation to an action. Will have that ready for review later today.

@pegnott
Copy link
Contributor

pegnott commented Aug 19, 2021

I have moved the resizable functionality (and because it can do all sorts of moveable things, renamed it to moveable) into common/actions following the popper example.

The pull request asks also for a tableCell component, and that is the next step. Today (through 08/22) I am interrupted by travel, and today I'll be mostly driving. I will be able to work, but be a little slower in response times. I anticipate that I can have a tablecolumn component done by Monday evening. If it's preferred before then, let me know and we can discuss the options.

@kgodey
Copy link
Contributor Author

kgodey commented Aug 19, 2021

@pegnott Thanks for the update! Monday evening is fine.

@pavish pavish changed the title Implement adding a new column, resizing columns Implement adding a new column Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Ready for implementation work: frontend Related to frontend code in the mathesar_ui directory
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants