Giter VIP home page Giter VIP logo

dotnet-smallnotes's People

Contributors

helluvamatt avatar

Watchers

 avatar

dotnet-smallnotes's Issues

Background and foreground colors

Allow specifying background and foreground colors.

Ideas:

  1. Predefined background colors come from a file 'colors.xml'
  2. "Custom" background color comes from a ColorDialog
  3. Use menus similar to how other applications define these properties on text
  4. Link colors may be the same as the foreground color just with an underline?
  5. Allow an "Automatic" foreground color that would be either Black or White depending on the background color.
  6. Link color should be blue (light blue or dark blue based on the computed foreground color)

Global hotkeys

Configurable Global Hotkeys* for the following actions (with default hotkey combos):

  • New Note (Ctrl + Alt + N)
  • Show/Hide Notes Toggle (Ctrl + Alt + T)
  • Focus and Edit most recently edited note (Ctrl + Alt + E)

*Global hotkeys work in any application without the need for SmallNotes to be focused.

Export notes

Add ability to export notes

  • As HTML (Render to .html file)
  • As Markdown (Copy source, embed properties to .md file)
  • As Plaintext (Extend Markdown renderer to render plaintext, render to .txt file)
    • Links render as: '"Title" (url)'
    • Images render as: 'Image: "Image Title" (url)'
    • HR render as '-' x 80
    • H1 renders as 'Text=====' (Same as Markdown)
    • H2 renders as 'Text-----' (Same as Markdown)
    • H3, H4, H5, H6 render as 'Text'
    • Unordered and ordered lists render same as Markdown, except numbers are automatically handled.
    • Tables should render as an ASCII art table

Remember Note location and size

Store and retrieve Note location and size in the Note data structure:

public Size Size { get; set; }
public Point Location { get; set; }

Cache for HTTP(S) downloads

Need a cache for HTTP(S) downloads (including images and stylesheets).

Loading SVGs from the network appears to take a while without the in-memory caching available to the default loading in HtmlRenderer.

Fit images in note by Width

Images should resize to fit in the note:

img
{
    max-width: 100%;
}

Render images as clickable links that will open the picture in the browser:

<a href="file:///path/to/image.jpg">
    <img src="file:///path/to/image.jpg">
</a>

Crash on empty language for code block

The following error has been traced to an empty language info attached to a code block:

859 [10] ERROR SmallNotes.UI.SmallNotesOptionsForm (null) - Failed to render Note to image
CommonMark.CommonMarkException: An error occurred during formatting of the document. ---> System.ArgumentException: The languageId argument value must not be empty.
Parameter name: languageId
   at ColorCode.Common.Guard.ArgNotNullAndNotEmpty(String arg, String paramName) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\ColorCode\ColorCode\Common\Guard.cs:line 22
   at ColorCode.Common.LanguageRepository.FindById(String languageId) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\ColorCode\ColorCode\Common\LanguageRepository.cs:line 28
   at ColorCode.Languages.FindById(String id) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\ColorCode\ColorCode\Languages.cs:line 252
   at SmallNotes.UI.NoteForm.CustomHtmlFormatter.WriteBlock(Block block, Boolean isOpening, Boolean isClosing, Boolean& ignoreChildNodes) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\SmallNotes\UI\NoteForm.cs:line 288
   at CommonMark.Formatters.HtmlFormatter.WriteDocument(Block document) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\CommonMark.NET\CommonMark\Formatters\HtmlFormatter.cs:line 81
   at SmallNotes.UI.NoteForm.<GetCommonMarkSettings>b__2(Block block, TextWriter target, CommonMarkSettings settings) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\SmallNotes\UI\NoteForm.cs:line 258
   at CommonMark.CommonMarkConverter.ProcessStage3(Block document, TextWriter target, CommonMarkSettings settings) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\CommonMark.NET\CommonMark\CommonMarkConverter.cs:line 229
   --- End of inner exception stack trace ---
   at CommonMark.CommonMarkConverter.ProcessStage3(Block document, TextWriter target, CommonMarkSettings settings) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\CommonMark.NET\CommonMark\CommonMarkConverter.cs:line 245
   at CommonMark.CommonMarkConverter.Convert(TextReader source, TextWriter target, CommonMarkSettings settings) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\CommonMark.NET\CommonMark\CommonMarkConverter.cs:line 302
   at CommonMark.CommonMarkConverter.Convert(String source, CommonMarkSettings settings) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\CommonMark.NET\CommonMark\CommonMarkConverter.cs:line 320
   at SmallNotes.UI.NoteForm.RenderNoteToHtml(Note note, String customCss) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\SmallNotes\UI\NoteForm.cs:line 456
   at SmallNotes.UI.Utils.ImageUtil.RenderNoteToBitmap(RenderNoteRequest req) in c:\Users\Matt\Development\Visual Studio 2013\Projects\SmallNotes\SmallNotes\UI\Utils\ImageUtil.cs:line 40

Example Markdown causing the issue:

    ```
    Code block
    ```

Configuration Window

Implement configuration window, non-inclusive list:

  • Default note settings
    • Note sizes and location (see #6)
    • Background color
    • Foreground color
  • Fast rendering enable/disable
  • Custom CSS
  • Hotkeys (see #2)

Backends

Ideas:

  • Test database (already implemented)
    • Has some hardcoded notes for testing
  • Simple FileDatabase (default)
    • Possibly use SQLite?
    • AppDataFolder is now set to the executable's containing folder to enable portability.
    • Files would be stored in a subdirectory off AppDataFolder or in SQLite database in AppDataFolder
  • Future: Google Drive / Dropbox / ownCloud / etc? (Open seperate issues)

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.