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

New Taskview #439

Merged
merged 97 commits into from
Oct 17, 2020
Merged

New Taskview #439

merged 97 commits into from
Oct 17, 2020

Conversation

diegogangl
Copy link
Contributor

@diegogangl diegogangl commented Jul 24, 2020

This is a PR for the new taskview widget.

This widget is a complete rewrite from scratch of the old taskview, based on @nekohayo's idea of using a timeout to process changes.

Changes

  • Waits 250ms after the last keypress before processing the text buffer
  • Goes line-by-line, using regexes and simple Python functions to detect tags, etc. (way faster)
  • Also needs to register less handlers
  • Our custom Gtk Text Tags are now subclassed and stored in a separate module (text_tags.py)
  • Tags with a custom color now have that color as a background, so they are more recognizable
  • Tags can be clicked now. Clicking the selects that tag in the task browser
  • Subtasks now have checkboxes that can toggle the done/not-done status (Man this was hard to get right)
  • When running with -d, the process function now prints the time it took to process the buffer. This will helps us stay conscious of the performance.
  • Supports internal links in the format: gtg://faf02f75-1de2-4370-8afc-34cf99e4b8fb. Of course nobody is going to use that, but we can build a proper UI down the road
  • Supports invisible characters that turn visible when the cursor passes over them. This could be useful for more tags in the future
  • Subtasks are added automatically and don't wait for enter to be pressed
  • Autoconverts contents to the new format
  • Closes the parent task when clicking on a subtask
  • Supports subheadings (with # Subheading)
  • Includes the foundations for more markdown features
  • Completes dark mode

Screenshot from 2020-07-23 21-22-07

closes #270
closes #150
fixes #45
ref #449

@diegogangl diegogangl added enhancement priority:critical Pull Request performance Issues affecting the speed and responsiveness of the application labels Jul 24, 2020
@diegogangl diegogangl force-pushed the taskview branch 2 times, most recently from 7cde89a to 8fcaee0 Compare August 6, 2020 00:23
@diegogangl diegogangl marked this pull request as ready for review August 9, 2020 23:33
@diegogangl diegogangl force-pushed the taskview branch 2 times, most recently from f63c768 to 176964f Compare September 20, 2020 22:16
@diegogangl diegogangl force-pushed the taskview branch 2 times, most recently from 0eba1a4 to b36c8b3 Compare September 27, 2020 23:13
This avoids a possible race condition where
 the requester will happily return none if a task hasn't been created
yet. To avoid any issues we delay getting the task until absolutely
necessary.
We don't remove the full indent anymore, it wasn't reliable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment