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

[Bug] Font size changes when a list is created using markdown #217

Open
alpererm opened this issue Aug 12, 2024 · 4 comments
Open

[Bug] Font size changes when a list is created using markdown #217

alpererm opened this issue Aug 12, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@alpererm
Copy link

alpererm commented Aug 12, 2024

Is your feature request related to a problem? Please describe.
I can set a default font without a problem, but the chosen font size is not recorded as the default. With every new file the font size is reset to 16. At this point, I work around it by using a template that has a single letter in the size that I prefer. However, the font size keeps going back to size 16, for example when I start a bulleted list.

Describe the solution you'd like
The font size that I've chosen when I am setting the default font can become the default size. Actually, I am fine with any option to set the default font size.

Additional context
I've tried Inter, Josefin sans and Tahome to make sure that it is not a font specific issue. I've experienced this both on a Chrome based browser and Safari on macOS Sonoma.

@johnozbay
Copy link
Member

Hi there 👋🏻

Due to the fact that tons of different devices, operating systems (and their versions), browsers (and their versions), browser extensions (and their versions) and things like DNS filters / VPN filters etc in use nowadays, there is no way we can test against all these combinations and scenarios.

While filing bug reports, please provide the specific information we ask for in our new issue templates, so that we can reproduce the issues you're experiencing and fix it up quicker.

We need the following information at the very minimum to be able to look into issues:

  • Device: [e.g. iPhone6 / Laptop with touchscreen etc.]
  • OS: [e.g. iOS8.1, Windows 10]
  • Browser [e.g. safari, chrome, firefox, stock browser]
  • Browser Version [e.g. 22]
  • Browser Extensions / Add-ons / Content/Ad-Blockers [e.g. uBlock Origin, CanvasBlocker etc. on iOS you can check these from your settings > safari > content blockers.]
  • Do you have any DNS-based content/ad-blockers? [i.e. pi-hole]
  • Are you on a managed network? [e.g. VPN / Corporate / Campus Network]

Thank you for your understanding,
J

@alpererm
Copy link
Author

alpererm commented Aug 15, 2024

Hi,

Maybe they are two separate issues. One is setting the default font size and other the font size change that happens when a list is created. In any case, below report is related to the default font size. If you find I can report the list issue separately:

Describe the bug
I can set a default font without a problem, but the chosen font size is not recorded as the default. With every new file the font size is reset to 16.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new document
  2. Click the font button
  3. Select the desired font and font size
  4. Set the font as default
  5. Create a new document
  6. Start typing. The font size selected in step 3 is not preserved.

Expected behavior
The font size that I've chosen when I am setting the default font to be preserved as the default size.

System Information (please complete the following information):

  • Device: MacBook Air (M2)
  • OS: macOS Sonoma
  • Browser: Safari
  • Browser Version: 17.5
  • Browser Extensions / Add-ons / Content/Ad-Blockers: Adblock Plus
  • Do you have any DNS-based content/ad-blockers?: no
  • Are you on a managed network? [e.g. VPN / Corporate / Campus Network]: no

Additional context
I've also tried on a Lenovo Thinkbook that runs Windows 10 and edge browser without any extensions and faced the same issue.

@johnozbay johnozbay self-assigned this Aug 15, 2024
@johnozbay johnozbay added the bug Something isn't working label Aug 15, 2024
@johnozbay
Copy link
Member

Thanks for the steps and the detailed info @alpererm! Deeply appreciated!
(more on why I asked about your browser / system details below)

I'll try to break down this problem into multiple parts, and address them separately.

1 — "Default" Font Size

One thing I noticed is that in the steps you're referring to "default font" and "font size", to Cryptee these are two separate parameters.

The default font is (should be — more on this below) stored on your device and applied to all new docs etc.
But font-size isn't. So setting the default font won't affect your font-size preference in new / other documents.

This is pretty much the same behavior on Google Docs / Word etc. Rich text editors tend not to have default font-size configurations. (i.e. create new google doc, font size will be 12, set font size to 18, type stuff, then create a new doc, it will be 12.)

That being said on Google Docs for example one can create custom styles, which can be used across documents, and they carry all sorts of stuff like "make sure paragraphs are this size and use this font, vs headings are this size and use that font etc"

— on Cryptee, currently there is no such feature, but we're considering building one. (like all other things, these would need to be stored encrypted, which complicates things and that takes a little bit more time)

However, even with this custom styles feature on Google Docs, you'd still need to pick the style each time you create a new doc, or use a template = which is what you can do on Cryptee as well (and from what I'm understanding you started doing also)

2 — The lists forgetting the font size selection.

I think this is where we might actually have a bug.

Here's a video to show it seems to be working in a Chromium browser IF you use the list toggle to create the list.

Font.size.is.retained.mp4

BUT we noticed that if you use markdown to create the list, the font size reverts to the original one. So there seems to be a markdown bug. We're looking into why this might be happening, and we'll try to get this fixed right away, as I can see how this could be super annoying.

In the meantime you can do a few things to work around this bug.

a) If the default font size is too small, one option is to use the zoom feature of your browser. We intentionally built Cryptee to scale correctly, so you can zoom in and set the size to something where your eyes are more comfortable, and your browser should remember this option.

b) Instead of markdown to create lists, you can use "cmd + shift + 8", and that should work as expected, and retain the font size.

3 — In case if you experience default fonts not getting saved.

This here is why I wanted to ask about the browser / version / details etc.

Many of Cryptee's users understandably have tons of ad blockers / privacy extensions / custom browsers etc, which can break parts of the browser Cryptee needs to store your preferences across sessions. + Each operating system has a different way of handling fonts + browsers have different font engines.

  1. Safari famously has (and had) tons of bugs with indexedDB (google "safari indexeddb bugs" for a fun trip down the rabbit hole) and Cryptee uses a combination between IndexedDB and LocalStorage to persist your choices between sessions on your device (i.e. default fonts) — so one potential issue here could be safari itself messing up the indexeddb and not remembering your choice.

  2. Things like Private / Incognito mode, or setting browsers to "don't store any cookies" (which blocks more than just cookies, and often also blocks local storage + indexedDB too) or heavy handed ad-blockers / content blockers could block indexedDB or LocalStorage in a last-ditch attempt to block tracking, which could cause Cryptee to forget your preferences like fonts, dark mode etc.

  3. Not knowing your browser version / extensions / setup on Windows, same could be the case here as well if you have a similarly restrictive configuration.


With these possibilities out of the way, here's what we can fix, here's what we can improve, and here's what we probably won't be able to address in the short term.

a) We're looking into why lists forget font sizes if you create the list with markdown, and we'll fix this right away.

b) We can add a per-device default font size setting, so on that given device you can set your default font size to be 24 for example, and all your new docs would be created with that. BUT, this will take a while, as we first need to figure out what's causing the markdown bug etc. + we'll need to create an easy UI for this either inside Docs or in Settings.

c) We can't add a way to create cross-document default font-sizes that are retained across devices without some significant work. Fonts are really tricky to work with, especially across devices and operating systems. And fonts can reveal a lot about a user. i.e. if you use a right-to-left font, and or use Cyrillic etc, it could reveal a lot about you and your language or country. So we can't store these unencrypted on the servers, and if we store these encrypted on the servers, that adds a level of complication with cross-device sync etc. So for now, we store all these types of preferences on your devices instead of uploading and sync'ing them across your devices.


For now, I'm going to update this issue's name to "Font size changes when a list is created using markdown" — and that way we can track this in our internal bug tracker and address it right away, then once we're done addressing this, we'll look into the default font size improvements next.

Hoping this makes sense!

Thank you for your patience and help!

Best,

J

@johnozbay johnozbay changed the title Default font size [Bug] Font size changes when a list is created using markdown Aug 15, 2024
@alpererm
Copy link
Author

Hi John,
Thanks for the detailed answer and taking time to figure it out. As you've written the bug surfaces only with the markdown (both for bulleted and numbered list). This was really disturbing the flow for me while writing. Now, I've tried "cmd + shift + 8" and "cmd + shift + 7" and they work perfectly fine. So, I have a working solution :). Thanks for that.
Standard font size is a nice to have. It sounds much more complicated than I thought. Setting the font size after creating a new document is easy enough.
Regards,
Alper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants