Skip to content

Conversation

@Miodec
Copy link
Member

@Miodec Miodec commented Mar 4, 2024

Description

Rework commandline:

  • use new animated modal to take advantage of native focus trapping
  • refactor all of the code to make it easier to follow, understand and modify
    • removed extra commandInput element. Input commands now use the same input field as the search does
    • renamed commands.ts to lists.ts. renamed variables and functions inside to be more self-explanatory
    • moved single command list generation code to the lists file
    • lists that require dynamically updating the command line (funbox, tags) no longer affect the dom. the commandline handles this instead
  • commandline is now loaded dynamically, only when requested
    • this further reduces bundle size, making the initial load slightly faster
    • added a utils file that handles these async imports
    • to make sure click events still work, added files which are solely responsible for attaching event handlers. any future events should be added there (and potentially, our current events too)
  • moved font preview code to UI
  • added aliases to some commands

Todo:

  • run hover when searching
  • add tab and shift tab navigation

@monkeytypegeorge monkeytypegeorge added frontend User interface or web stuff assets Languages, themes, layouts, etc. labels Mar 4, 2024
@fehmer fehmer self-requested a review March 4, 2024 15:43
@Miodec Miodec marked this pull request as ready for review March 4, 2024 20:42
@Miodec Miodec merged commit 3c4212b into master Mar 5, 2024
@Miodec Miodec deleted the new-commandline branch March 5, 2024 18:34
Miodec pushed a commit that referenced this pull request Oct 7, 2024
…xaskii) (#5949)

### Description

Adds `<Ctrl-p>` and `<Ctrl-n>` binds to the command-line. These are from
Emacs, but you can navigate up and down menus all over macOS and its
apps with these keybinds.

#### Relevant PRs
Refactor that removed the binds:
#5180
adding "vim keybinds":
#4019

Confirmed working on macOS (safari, firefox, and chrome). On windows,
`<Ctrl-n>`: opening a new window takes priority, but that's expected
behaviour.

### Checks

- [ ] Adding quotes?
- [ ] Make sure to include translations for the quotes in the
description (or another comment) so we can verify their content.
- [ ] Adding a language or a theme?
- [ ] If is a language, did you edit `_list.json`, `_groups.json` and
add `languages.json`?
  - [ ] If is a theme, did you add the theme.css?
- Also please add a screenshot of the theme, it would be extra awesome
if you do so!
- [x] Check if any open issues are related to this PR; if so, be sure to
tag them below.
- [x] Make sure the PR title follows the Conventional Commits standard.
(https://www.conventionalcommits.org for more info)
- [x] Make sure to include your GitHub username prefixed with @ inside
parentheses at the end of the PR title.

<!-- label(optional scope): pull request title (@your_github_username)
-->

<!-- I know I know they seem boring but please do them, they help us and
you will find out it also helps you.-->

Closes issue discussed in discord.

<!-- the issue(s) your PR resolves if any (delete if that is not the
case) -->
<!-- please also reference any issues and or PRs related to your pull
request -->
<!-- Also remove it if you are not following any issues. -->

<!-- pro tip: you can mention an issue, PR, or discussion on GitHub by
referencing its hash number e.g:
[#1234](#1234) -->

<!-- pro tip: you can press . (dot or period) in the code tab of any
GitHub repo to get access to GitHub's VS Code web editor Enjoy! :) -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assets Languages, themes, layouts, etc. frontend User interface or web stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants