Giter Site home page Giter Site logo

commatoze's People

Contributors

dmitriy-shmilo avatar

Watchers

 avatar

commatoze's Issues

Implement "Save As" command.

  • Add a "Save As" menu option.
  • When invoked, present a UIDocumentPickerViewController for export.
  • Once the picker is finished, perform a save operation.

Support single cell copy and paste.

  • Investigate modifying the main menu.
  • Add Edit > Copy and Edit > Paste operations with hotkeys.
  • When a single cell is copied, place its corresponding text value into UIPasteboard.
  • When a paste is invoked, replace the selected cell's value with whatever is in the UIPasteboard.

Persist column widths and row heights.

  • Keep column metadata in the viewmodel.
  • Keep row metadata in the viewmodel.
  • When a row or column size changes, update the metadata.
  • Persist the table metadata in a temp file.

Align text to the top.

Currently all cells vertically align their text to the center. The text should be top-aligned.

Implement adding new columns and rows.

  • Add insert column before, insert column after, insert row before, insert row after menu items.
  • When selected, execute a corresponding action and reload the table.

Add column and row header context menu.

  • When the user right-clicks a header, show a context menu.
  • Allow to delete the current row/column.
  • Allow to insert a column/row before/after the selected one.

Move expensive operations to the background.

  • Add a loading indicator when an operation is in progress.
  • Perform file reading and saving on the background.
  • Perform big data modifications on the background.
  • Prevent other operations from executing while the current one is not done.

Add logging.

  • Add a logger utility.
  • Distinguish between logging levels.
  • Log to a console.
  • Log into a file.
  • Add logging statements in the viewmodel and important callbacks.

Keyboard navigation.

  • If there's a valid singleselection, and an arrow key is pressed, move the selection.
  • If a multi-cell selection is active, use the top-left cell as a starting point.
  • If a single column is selected, select neighboring columns on left-right, select the top cell on bottom arrow press.
  • If multiple columns are selected, use the left-most one as a starting point.
  • Do the same for row selections.
  • Do nothing if a cell is being edited.
  • Do nothing if a new selection would be invalid.

Start cell editing if a key is pressed.

  • Override pressesBegan in the main view controller.
  • If there is a cell selection, and a key is pressed, and it has a textual representation, start editing the selected cell.
  • Replace or append the corresponding text to the editor's text.

Implement undo and redo actions.

  • Add undo and redo actions to the main menu.
  • Add an UndoManager.
  • When any change is performed on the document, push it onto the undo stack.
  • If undo or redo is possible, allow the corresponding actions execution.

Let the user toggle the first data row as a header row.

Add a menu item, which allows to toggle first row as a header. Off by default. When selected, the first data row should move into the sticky header row. When deselected, the data row should return back into the main content area.

Allow deleting rows and columns.

  • Add "Delete Column(s)" and "Delete Row(s)" menu items.
  • Add deleteColumns(from:to:) and deleteRows(from:to:) viewmodel calls.
  • Execute row/column deletion whenever at least one column or row is selected.

Show unsaved changes indicator.

  • When a changing action is performed, mark the document as dirty.
  • Display an indicator in the title bar.
  • The mark should be cleared when the file is saved. But the undo stack should be preserved, and because of that it's not possible to simply rely on canUndo property.
  • Undoing/redoing an action after a save should mark the document as dirty again.
  • The mark should be cleared when opening a file in the current view.

Support single row and column copy and paste.

  • If a row or a column is being copied, copy all of its contents into a text buffer.
  • If a row or a column is selected, when a paste action is being executed, replace the selected row or column with the copied contents.

Read actual CSV data.

  • Add a CSV parser library to the project.
  • Add a temporary test csv file to the project.
  • Open the file upon the main window launch and read the data.
  • Populate the data property, update column and row count.
  • Reload the table.

Support changing column and row width and height.

  • Add a custom header cell view for rows and columns.
  • Define a resize area on the header cell.
  • When the cursor hovers above the resize area, change it to an appropriate one.
  • When the user presses on the resize area begin resizing the appropriate column.
  • As the user drags their mouse, update the resize state.
  • When the press is released, finalize the resize.

Should be doable with https://developer.apple.com/documentation/uikit/uipangesturerecognizer or https://developer.apple.com/documentation/uikit/uihovergesturerecognizer.

Write modified CSV data.

  • Add a save action trigger of any sort.
  • Handle table editing actions.
  • When the action is triggered, save all CSV data in a file.

Add "New Document" menu action.

  • Add a Cmd-N menu action, which spawns a new content table.
  • Spawn a document with a single cell.
  • When deleting rows and column always leave at least one empty cell.

Support file drag and drop.

When a file is dropped onto a main window, it should be opened for editing.

  • Register the UIDropInteraction on the main view.
  • Implement a UIDropInteractionDelegate.
  • File URL appears to be available with loadInPlaceFileRepresentation
  • Try to open and parse the file.

Open files in new windows.

  • When a file is being opened with Cmd-O, a new window should be launched.
  • Add another command to open a file within the current window.

Handle invalid field count when opening a file.

When opening a file, keep checking the field count on each row.

  • If the current row contains less fields than expected, add missing empty fields before proceeding to the next row.
  • If the current row contains more fields than expected, stop reading the file and throw an error.

Support search.

  • Add a search menu item and a shortcut.
  • When invoked, display a search window with a textbox.
  • When a value is entered and a search button is pressed, find the first matching cell and scroll to it.
  • On subsequent presses, search the next entry from the current position.

Refactor main menu into a separate controller.

  • Add a main menu controller, bound to a content table view model.
  • Add main menu building to the controller.
  • Remove all main menu action handlers from the content table view controller.
  • Call into main menu controller when executing menu actions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.