Skip to content

Arbitrary font size preference is allowed #264

Closed

Description

@johnblommers

Description

If you set a large font size in the preferences marktext does not complain and evidently complies. As a a result it is impossible to see anything in the application window.

Steps to reproduce

  1. Change the font size to 2416 in the preferences
  2. Save the preferences and exit marktext
  3. Open marktext and try to edit the preferences. You get white window contents.

Expected behavior:
marktext notices the font size is crazy large, complains to the user and replaces it with a default of 16 pts.

Actual behavior:

All you see is a blank page. No error message is displayed

Example preference file:

{
  "fontSize": "2416px",
  "lightColor": "rgb(48, 49, 51)",
  "darkColor": "rgb(217, 217, 217)",
  "lineHeight": 2,
  "theme": "light",
  "autoSave": true,
  "aidou": false,
  "preferLooseListItem": true,
  "autoPairBracket": true,
  "autoPairMarkdownSyntax": true,
  "autoPairQuote": true
}

Versions

  • Mark Text: v 0.10.21
  • OS: macOS 10.11.6 El Capitan

Activity

  1. fxha commented on May 15, 2018

    @fxha
    Contributor

    Since the user preferences file is completely free, the user should be very clear about the purpose of his own settings, otherwise he should use the settings in the menu view => font.

    But I think it's a good idea to validate settings before saving, when we rebuild settings view.

  2. Jocs commented on May 20, 2018

    @Jocs
    Member

    @johnblommers

    We are also considering whether to modify the current configuration file into a visual configuration interface so that similar problems can be avoided.
     
    The configuration file is more friendly to the developer. The visual configuration interface can do some verification processing on the input. Which one do you prefer?

  3. added
    🦁 need discuss
    on May 20, 2018
  4. johnblommers commented on May 20, 2018

    @johnblommers
    Author

    The visual configuration interface is far more user-friendly and I always put the user first.

  5. fxha commented on May 20, 2018

    @fxha
    Contributor

    Some key points why we should build a GUI for settings:

    • easier to use from a users point of view
    • less error prone (because someone type in invalid values)
    • we can integrate custom themes and plugin-settings later
    • we do not have to convert old settings to new settings (and support old settings format) - because of pre-release version
    • @Jocs we can seperate settings from GUI (Mark Text) and the "core"

    Furthermore we should add a --safe mode in the new settings to run Mark Text without loading user settings, themes and plugins. So that we/the user can test issues in "safe mode" without loading user configuration.

    Cons:

    • more work for us 😄
    • we delete all user settings
  6. Jocs commented on May 20, 2018

    @Jocs
    Member

    Furthermore we should add a --safe mode in the new settings to run Mark Text without loading user settings, themes and plugins. So that we/the user can test issues in "safe mode" without loading user configuration.

    How about a reset to default setting ?

  7. fxha commented on May 20, 2018

    @fxha
    Contributor

    How about a reset to default setting ?

    Sure also a good idea, but I don't want to reset my settings to test an issue.

  8. Jocs commented on Jun 12, 2018

    @Jocs
    Member

    Related with #324

  9. fxha commented on May 9, 2019

    @fxha
    Contributor

    Resolved in PR #1003

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🦁 need discuss

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions