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

In text editor, fix behaviour of Home and End keys #836

Merged
merged 2 commits into from
Jun 18, 2024

Conversation

alexjpwalker
Copy link
Member

Usage and product changes

The behaviour of Home and End keys are now in line with most other text editors, moving to the start/end of the line (rather than the file) unless Ctrl (Cmd on MacOS) is additionally pressed.

Implementation

We had some confusing terminology in the Command class - MOVE_HOME and MOVE_END intuitively sounded like they should correspond to a keyboard's Home and End keys, but this resulted in incorrect behaviour. We've renamed them to MOVE_CONTENT_START and MOVE_CONTENT_END, and these are now correctly only triggered by Ctrl+Home and Ctrl+End respectively. Home and End take you to the start/end of a line. If Shift is additionally pressed in any case, trigger selection.

@typedb-bot
Copy link
Member

typedb-bot commented Jun 18, 2024

PR Review Checklist

Do not edit the content of this comment. The PR reviewer should simply update this comment by ticking each review item below, as they get completed.


Trivial Change

  • This change is trivial and does not require a code or architecture review.

Code

  • Packages, classes, and methods have a single domain of responsibility.
  • Packages, classes, and methods are grouped into cohesive and consistent domain model.
  • The code is canonical and the minimum required to achieve the goal.
  • Modules, libraries, and APIs are easy to use, robust (foolproof and not errorprone), and tested.
  • Logic and naming has clear narrative that communicates the accurate intent and responsibility of each module (e.g. method, class, etc.).
  • The code is algorithmically efficient and scalable for the whole application.

Architecture

  • Any required refactoring is completed, and the architecture does not introduce technical debt incidentally.
  • Any required build and release automations are updated and/or implemented.
  • Any new components follows a consistent style with respect to the pre-existing codebase.
  • The architecture intuitively reflects the application domain, and is easy to understand.
  • The architecture has a well-defined hierarchy of encapsulated components.
  • The architecture is extensible and scalable.

@alexjpwalker alexjpwalker merged commit 18adf24 into typedb:development Jun 18, 2024
5 checks passed
@alexjpwalker alexjpwalker deleted the fix-home-end-keys branch June 18, 2024 15:12
@alexjpwalker
Copy link
Member Author

alexjpwalker commented Jun 19, 2024

NB this is the correct fix to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants