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

Snippets #1755

Closed
16 of 26 tasks
carloscabanero opened this issue Apr 17, 2023 · 8 comments
Closed
16 of 26 tasks

Snippets #1755

carloscabanero opened this issue Apr 17, 2023 · 8 comments
Assignees
Labels
feature Feature requested by users

Comments

@carloscabanero
Copy link
Member

carloscabanero commented Apr 17, 2023

  • Good search engine for commands.
    • This can be fake at the moment. At one point we will have something that will search over all your snippets.
  • Format for snippets & commands.
    • .sh
# Name
# Description
Script (if working with text, you can always substitute using other apps.) 
    • Text
      • Name text file
    • Enc (format .gpg? .enc?)
    • Groups:
      • .snippets/build/snippet1
      • .snippets/all/…
      • .snippets/
  • Base collection of snippets.

  • Special flows for design: creating snippets, selecting snippets, etc…

  • Introducing a snippet in the shell. Helpers, clues & Autocompletion.

    • Research on other formats. How others are performing this completions, etc…
    • You may not want to perform autocompletion in a small window. If you are pasting a
  • (Quick Actions: Connect to a Host, Start configuration to a specific place, Changing styles, etc…)

    • Quick actions could perform automatic replacement.
  • (Three finger, contextual menu replacement: Layout, New Window, Close Window.)

  • Syncing.

    • iCloud
    • Sharing between users (non-iCloud).
    • Shareable via email.
  • AI input

Snippets TODO

Preview Give feedback
@carloscabanero carloscabanero added the feature Feature requested by users label Apr 17, 2023
@carloscabanero
Copy link
Member Author

@yury For the Create snippet flow, it may be interesting to make more obvious the snippet will be created with certain parameters. Something like:
Screenshot 2023-06-22 at 8 52 29 AM

@carloscabanero
Copy link
Member Author

carloscabanero commented Jun 22, 2023

Few tweaks now that we have multiple Snippets Locations working:

  • Need some attributes (at least isReadOnly) for the locations.
  • Renames should happen within the same sources.
  • Errors during refresh.
  • Index Progress
  • Smarter GitHub refresh.
  • Progress visuals
  • Same Snippet name on different location. The content is still shown as the same even if it isn't. There is also no way at the moment to differentiate based on location. We should decide if we want to shadow them, as with Ignore we could have a good mechanism.
  • Cleanup tests.
  • Review code, cleanup try? and try! we used to force errors, check bindings and published values (some unused?), etc...
  • Spaces vs tabs on snippets. We need to set on one as that will be the default for indexes. (@yury votes for spaces)
  • Cleanup the output (independently of multi-line?).
  • Fuzzy search mode is not showing some results sometimes. It sometimes requires some back and forth.

UI tweaks

  • On iPhone, replace Return with Next in template mode.
  • Snippets bar not showing with software keyboard.
  • Use arrow.clockwise for refresh
  • Keyboard bubble shows after dismiss. Other OSs too?

UX tweaks

  • When we Exit template mode, there is no cursor anymore.
  • Sometimes it is not obvious we are on Template mode. And it is not obvious how you switch between tags, or how to exit. Maybe add it at the bottom.
    • We implemented two ways (color codes and a special mode). For final release we should get rid of one.
  • Hard to differentiate between Rename and Create
  • NSAttributedString issue on multi line snippets

Documentation

  • Notes for what a good Snip should look like, etc...
  • Intro. How to use the feature, etc...

Other notes

  • We may want to come up with a different name as this is diverging from snippets.

@carloscabanero
Copy link
Member Author

Crazy idea but maybe save on GitHub could generate a PR request?

@yury
Copy link
Collaborator

yury commented Jul 7, 2023

We have issue with NSAttributedString and \t and \\.

Original content len 65:
-H \'Content-Type: application/json\' \\\n\t-d \'@${local_file}.json\'

After calling Highlight.text(...) resulting attributed string has different length 62:
-H \'Content-Type: application/json\' \\ -d \'@${local_file}.json\'

temporary fix 3dc67fa

@yury
Copy link
Collaborator

yury commented Jul 7, 2023

Another issue with Tap to close gesture. It triggers when you tap/click on text area itself.

@carloscabanero
Copy link
Member Author

We have issue with NSAttributedString and \t and \\.

Original content len 65: -H \'Content-Type: application/json\' \\\n\t-d \'@${local_file}.json\'

After calling Highlight.text(...) resulting attributed string has different length 62: -H \'Content-Type: application/json\' \\ -d \'@${local_file}.json\'

temporary fix 3dc67fa

I think this is looking good disabled. Less distracting, so closing there.

yury added a commit that referenced this issue Jul 18, 2023
@yury yury self-assigned this Jul 18, 2023
@carloscabanero
Copy link
Member Author

carloscabanero commented Jul 26, 2023

  • iCloud and refreshing content while offline. Things may time out, the reads will hang and snippets will take around 10 seconds to show up. We designed the system to serve in chunks. But then we waited as then they are sorted and all that.
  • Process as they come, and let the flow decide how it aggregates them.
  • Do not block on iCloud. Send the cached elements.

@carloscabanero
Copy link
Member Author

carloscabanero commented Aug 1, 2023

  • With the snips search bar open, switching to a different application will crash the app. Sent debug logs from crashes to TF.
  • The SW enter key should work in the search view. It makes it easier to type and go.

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

No branches or pull requests

2 participants