Closed nuttyartist closed 1 year ago
Is there a way to test changes to the UPDATES.json file without pushing? I think you could maybe fix it by not using <p></p>
tags for every line (instead use <ul>
or <br>
's or something), but I don't know how to test that.
Is there a way to test changes to the UPDATES.json file without pushing?
You could start a local server to serve a custom UPDATES.json
, e.g.:
# run this in the same directory where UPDATES.json is
python3 -m http.server 8000
And then you'd have to also edit updaterwindow.cpp
and point the URL in UPDATES_URL
to http://localhost:8000/UPDATES.json
.
I improved it a bit, but now I feel the bullet points are indented too much. I can't seem to change the styling of the <li>
tags in C++ for some reason. I tried it with this in the updaterwindow constructor:
m_ui->changelog->setStyleSheet(QStringLiteral("QTextBrowser li { margin-left: 0; padding-left: 0; }"));
But that doesn't seem to do anything. It currently looks like this:
Yeah, I also tried to remove that padding but I couldn't either...
And I believe we can style elements directly in <style>
, so using setStyleSheet()
doesn't seem necessary there.
Here's what I got so far (indented for legibility):
<style>
div {
color: #000;
}
kbd {
color: #24292f;
background-color: #f6f8fa;
}
</style>
<div>
<p>A new release is here with some new features and many bug fixes and improvements.</p>
<p>New features:</p>
<ul>
<li>You can now open external links by holding <kbd>Ctrl</kbd> while clicking them.</li>
<li>
<span>You can now format text using keyboard shortcuts:</span>
<ul>
<li>Bold: <kbd>Ctrl</kbd> + <kbd>B</kbd>.</li>
<li>Italic: <kbd>Ctrl</kbd> + <kbd>I</kbd>.</li>
<li>Strikethrough: <kbd>Ctrl</kbd> + <kbd>S</kbd>.</li>
</ul>
</li>
<li>You can create different heading levels with <kbd>Ctrl</kbd> + <kbd>1</kbd>...<kbd>6</kbd>.</li>
<li>You can increase or decrease levels by using <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + (<kbd>+</kbd> or <kbd>-</kbd>).</li>
<li>You can now access the app menu by pressing <kbd>F10</kbd> (<kbd>Fn</kbd> + <kbd>F10</kbd> on macOS).</li>
</ul>
<p>Improvements and bug fixes:</p>
<ul>
<li>Automatic updates now work on Windows.</li>
<li>Fixed bugs with native window decoration.</li>
<li>We improved the style of selecting multiple notes.</li>
<li>Fixed a bug on Windows causing extreme input delay when editing text.</li>
<li>Streamlined the look and feel of some windows to match the OS better.</li>
<li>Fixed issues when resizing the window's splitters and resizing the window itself.</li>
<li>Fixed some bugs causing crashes.</li>
<li>Many more fixes and improvements under the hood.</li>
</ul>
<p>Big thanks to the people who contributed to this release! We have big plans for the future of Notes. We aim to make Notes, not just the best open-source note-taking app but the best note-taking app, period.</p>
<p>Join our <span><a href='https://discord.gg/RP6ReXRn5j'>Discord</a></span> for discussions, and feel free to email us. We love to hear from our users.</p>
</div>
<br>
Or, this one-liner to put in UPDATES.json
:
<style>div{color: #000;}kbd{color: #24292f; background-color: #f6f8fa;}</style><div> <p>A new release is here with some new features and many bug fixes and improvements.</p><p>New features:</p><ul> <li>You can now open external links by holding <kbd>Ctrl</kbd> while clicking them.</li><li> <span>You can now format text using keyboard shortcuts:</span> <ul> <li>Bold: <kbd>Ctrl</kbd> + <kbd>B</kbd>.</li><li>Italic: <kbd>Ctrl</kbd> + <kbd>I</kbd>.</li><li>Strikethrough: <kbd>Ctrl</kbd> + <kbd>S</kbd>.</li></ul> </li><li>You can create different heading levels with <kbd>Ctrl</kbd> + <kbd>1</kbd>...<kbd>6</kbd>.</li><li>You can increase or decrease levels by using <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + (<kbd>+</kbd> or <kbd>-</kbd>).</li><li>You can now access the app menu by pressing <kbd>F10</kbd> (<kbd>Fn</kbd> + <kbd>F10</kbd> on macOS).</li></ul> <p>Improvements and bug fixes:</p><ul> <li>Automatic updates now work on Windows.</li><li>Fixed bugs with native window decoration.</li><li>We improved the style of selecting multiple notes.</li><li>Fixed a bug on Windows causing extreme input delay when editing text.</li><li>Streamlined the look and feel of some windows to match the OS better.</li><li>Fixed issues when resizing the window's splitters and resizing the window itself.</li><li>Fixed some bugs causing crashes.</li><li>Many more fixes and improvements under the hood.</li></ul> <p>Big thanks to the people who contributed to this release! We have big plans for the future of Notes. We aim to make Notes, not just the best open-source note-taking app but the best note-taking app, period.</p><p>Join our <span><a href='https://discord.gg/RP6ReXRn5j'>Discord</a></span> for discussions, and feel free to email us. We love to hear from our users.</p></div><br>
I basically just fixed a typo (decereas
-> decrease
), and I tried to make the style of keyboard shortcuts look a bit better:
https://user-images.githubusercontent.com/626206/222934617-25bf075c-a18d-468b-8c07-94b48e956cf9.mp4
But yeah, the huge left padding makes it look hideous, so we probably have to improve upon the approach @nuttyartist first went with.
Curiously, I was able to remove the list bullet points with ul { list-style: none; }
, but still no success in removing the padding. 🤷
Seems like setting -qt-list-indent: 0;
in ul
removes the indentation, but removes the bullet point if the value is 0.
Looks like qt overrides some styles by default: https://doc.qt.io/qt-6/richtext-html-subset.html#qt-specific-css-properties
Yeah, I also tried to remove that padding but I couldn't either...
And I believe we can style elements directly in
<style>
, so usingsetStyleSheet()
doesn't seem necessary there.Here's what I got so far (indented for legibility):
<style> div { color: #000; } kbd { color: #24292f; background-color: #f6f8fa; } </style> <div> <p>A new release is here with some new features and many bug fixes and improvements.</p> <p>New features:</p> <ul> <li>You can now open external links by holding <kbd>Ctrl</kbd> while clicking them.</li> <li> <span>You can now format text using keyboard shortcuts:</span> <ul> <li>Bold: <kbd>Ctrl</kbd> + <kbd>B</kbd>.</li> <li>Italic: <kbd>Ctrl</kbd> + <kbd>I</kbd>.</li> <li>Strikethrough: <kbd>Ctrl</kbd> + <kbd>S</kbd>.</li> </ul> </li> <li>You can create different heading levels with <kbd>Ctrl</kbd> + <kbd>1</kbd>...<kbd>6</kbd>.</li> <li>You can increase or decrease levels by using <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + (<kbd>+</kbd> or <kbd>-</kbd>).</li> <li>You can now access the app menu by pressing <kbd>F10</kbd> (<kbd>Fn</kbd> + <kbd>F10</kbd> on macOS).</li> </ul> <p>Improvements and bug fixes:</p> <ul> <li>Automatic updates now work on Windows.</li> <li>Fixed bugs with native window decoration.</li> <li>We improved the style of selecting multiple notes.</li> <li>Fixed a bug on Windows causing extreme input delay when editing text.</li> <li>Streamlined the look and feel of some windows to match the OS better.</li> <li>Fixed issues when resizing the window's splitters and resizing the window itself.</li> <li>Fixed some bugs causing crashes.</li> <li>Many more fixes and improvements under the hood.</li> </ul> <p>Big thanks to the people who contributed to this release! We have big plans for the future of Notes. We aim to make Notes, not just the best open-source note-taking app but the best note-taking app, period.</p> <p>Join our <span><a href='https://discord.gg/RP6ReXRn5j'>Discord</a></span> for discussions, and feel free to email us. We love to hear from our users.</p> </div> <br>
Or, this one-liner to put in
UPDATES.json
:<style>div{color: #000;}kbd{color: #24292f; background-color: #f6f8fa;}</style><div> <p>A new release is here with some new features and many bug fixes and improvements.</p><p>New features:</p><ul> <li>You can now open external links by holding <kbd>Ctrl</kbd> while clicking them.</li><li> <span>You can now format text using keyboard shortcuts:</span> <ul> <li>Bold: <kbd>Ctrl</kbd> + <kbd>B</kbd>.</li><li>Italic: <kbd>Ctrl</kbd> + <kbd>I</kbd>.</li><li>Strikethrough: <kbd>Ctrl</kbd> + <kbd>S</kbd>.</li></ul> </li><li>You can create different heading levels with <kbd>Ctrl</kbd> + <kbd>1</kbd>...<kbd>6</kbd>.</li><li>You can increase or decrease levels by using <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + (<kbd>+</kbd> or <kbd>-</kbd>).</li><li>You can now access the app menu by pressing <kbd>F10</kbd> (<kbd>Fn</kbd> + <kbd>F10</kbd> on macOS).</li></ul> <p>Improvements and bug fixes:</p><ul> <li>Automatic updates now work on Windows.</li><li>Fixed bugs with native window decoration.</li><li>We improved the style of selecting multiple notes.</li><li>Fixed a bug on Windows causing extreme input delay when editing text.</li><li>Streamlined the look and feel of some windows to match the OS better.</li><li>Fixed issues when resizing the window's splitters and resizing the window itself.</li><li>Fixed some bugs causing crashes.</li><li>Many more fixes and improvements under the hood.</li></ul> <p>Big thanks to the people who contributed to this release! We have big plans for the future of Notes. We aim to make Notes, not just the best open-source note-taking app but the best note-taking app, period.</p><p>Join our <span><a href='https://discord.gg/RP6ReXRn5j'>Discord</a></span> for discussions, and feel free to email us. We love to hear from our users.</p></div><br>
I basically just fixed a typo (
decereas
->decrease
), and I tried to make the style of keyboard shortcuts look a bit better:But yeah, the huge left padding makes it look hideous, so we probably have to improve upon the approach @nuttyartist first went with.
Curiously, I was able to remove the list bullet points with
ul { list-style: none; }
, but still no success in removing the padding. 🤷
Looking good! The indentation is annoying. I'm trying to find a solution as well.
Setting
<ul style='margin-left:-2em'>
solves the issue on my machine. Can you guys test this?
Oh, very nice! And if we set that rule globally, i.e.:
<style>
ul {
margin-left: -2em;
}
</style>
In my opinion the indentation looks even nicer:
<ul style='margin-left:-2em'>
I think it's a bit too much. I think we can set it globally and add <ul style='margin-left:-1em'>
for the formatting shortcuts ui
.
Therefore looking like this:
That looks good to me as well!
I'd recommend using the Qt 6 AppImage, by the way.
It will require at least Ubuntu 20.04 LTS (or a distro with a non-ancient version of glibc), otherwise it won't run.
Which is not unreasonable, since official support for the previous LTS release (18.04), will end in a month.
I'd also squash those 4 commits into a single one before merging.
I'd recommend using the Qt 6 AppImage, by the way.
Alrighty.
I will still upload the Qt5 one to the Releases page.
I'd also squash those 4 commits into a single one before merging.
👍
Just wrote in Discord the process before releasing
https://discord.com/channels/1032620427501129779/1032620428495163436
So just want to see if my process is correct.
- I will merge https://github.com/nuttyartist/notes/pull/510 into dev
- I will merge dev into master
- Create a new release and tag based on the master branch
- Upload the binaries created by Github Actions (and re-create and sign the macOS one)
- Create a PR for the dev branch with the new UPDATES.json file and the new binaries links.
- Merge into master.
- All our users getting an update (:
Is that the correct way to do it?
I will still upload the Qt5 one to the Releases page.
Perfect.
Just wrote in Discord the process before releasing
Wait, if you merge this PR into dev
, and then merge dev
into master
before releasing the 2.1.0 binaries, wouldn't it mess up the auto updater?
I will still upload the Qt5 one to the Releases page.
Perfect.
Just wrote in Discord the process before releasing
Wait, if you merge this PR into
dev
, and then mergedev
intomaster
before releasing the 2.1.0 binaries, wouldn't it mess up the auto updater?
Oh, you're right. So should I create a new release based on the dev branch?
Not necessarily. I'd do it like this:
dev
into master
nowv2.1.0
tag (i.e. git tag ...
and git push
) master
and merge it into master
as wellSounds good! Thanks @guihkx!
There is one problem with the text. The line spacing doesn't allow the points to be close together for some reason.
Here's how it looks on my computer:
Dows someone knows the correct HTML to fix this? If we can't, I'll revert to plain text, but I thought it would be nice to have links to our Discord and bold formatting using HTML.