Commit Graph

789 Commits (master)
 

Author SHA1 Message Date
Gonçalo Silva 65e7028843 Add toggle between various preview modes
Including:
* Full-width (original)
* Half-width
* Half-height
* Windowed
2019-05-04 16:33:09 +01:00
Gonçalo Silva f72f61ae7d Fix stats' i18n 2019-05-04 16:33:09 +01:00
Gonçalo Silva 2cb161307c Improve side-by-side experience
Includes multiple improvements to scroll syncing, preview re-render,
layout separation, etc
2019-05-04 16:33:09 +01:00
Gonçalo Silva 5e770510ee Add support for side-by-side preview
Fixes #59
2019-05-04 16:33:09 +01:00
Gonçalo Silva bc23fa9b0b Make characters-per-line configurable
This is in preparation for the side-by-side preview, where the editor
needs to become more adaptable. It indirectly fixes #141, as users can
now change the desired line-length, although there is no UI setting for
it.
2019-05-04 16:33:09 +01:00
Gonçalo Silva 562cc7e200 Sync scroll between text view and web view
Scrolling is synced via scroll percentage. This works for most cases,
but breaks down on very large or complex documents. It is consistent
with the approach other editors use (eg. iA Writer), but in the future
we should explore alternatives that don't incur in edge cases.

The syncing itself is done via JavaScript. It could be argued that a
`WebExtension` is the better approach, but it is considerably more
complex for such a simple use case and it would be painful to implement
until UberWriter's build system is updated, since it requires
implementing a C extension.

Fixes #55
2019-05-04 16:33:09 +01:00
Gonçalo Silva 63b20d0f3c Match breakpoints 2019-05-04 16:33:09 +01:00
somas95 b9e2720eed
Merge pull request #159 from goncalossilva/fix.markup
Small markup fixes
2019-05-04 14:18:12 +02:00
Manuel Genovés 6c50e53c9d Merge branch 'BrainBlasted-migrate-to-gspell' 2019-05-04 14:12:42 +02:00
Manuel Genovés 249e78c746 Migrate to gspell 2019-05-04 14:11:23 +02:00
Gonçalo Silva 241ba567e4 Fix character count with horizontal rules
Pandoc's conversion to plain text converts horizontal rules to a
sequence of 72 dashes. This update ensures that subsequent dashes
are ignored when counting characters.
2019-05-01 19:04:50 +01:00
Gonçalo Silva 9238a82d4d Fix #154 2019-05-01 19:04:27 +01:00
Gonçalo Silva 3bbbdf95e1 Add .idea to gitignore 2019-05-01 16:37:57 +01:00
Manuel Genovés cd6e5a86aa linting 2019-05-01 16:57:04 +02:00
somas95 5deae402b7
Merge pull request #152 from BrainBlasted/add-dirs-to-gitignore
gitignore: Add generated folders
2019-05-01 16:50:56 +02:00
somas95 dc80c6763a
Merge pull request #158 from UberWriter/flatpak-improvements
Flatpak improvements
2019-05-01 16:50:15 +02:00
Christopher Davis e0cea3654a Migrate to gspell
gtkspellcheck is abandoned; Use gspell instead.

Closes https://github.com/UberWriter/uberwriter/issues/93
2019-04-28 23:03:10 -04:00
Christopher Davis 15c69190d8 gitignore: Add generated folders
These folders are not tracked by us and thus should be
ignored. Prevents them from accidentally being added.
2019-04-22 18:37:43 -04:00
somas95 181af445e6
Merge pull request #148 from goncalossilva/ft.styles
Minor improvements around styles
2019-04-21 21:22:38 +02:00
Gonçalo Silva 878bbdb67c Cap preview width similar to GitHub
It is presumed that this was not included in the original stylesheets
(which were heavily based on GitHub's) because it is set in JS.
2019-04-21 01:50:49 +01:00
Gonçalo Silva ddcf76df47 Set text view padding in Python instead of CSS
Otherwise scrolling calculations will be slightly offset, as the CSS
padding is added *on top* of any other margin.
2019-04-21 01:50:49 +01:00
Gonçalo Silva 81f9104d9f Split gtk and web CSS into separate directories
Helps clean up the CSS selection on the export dialog, as only Web CSS
is useful in that scenario.
2019-04-21 01:50:49 +01:00
Gonçalo Silva e87de1424e Remove hard-coding from Gtk-related CSS
It's unecessary, since Adwaita and most popular themes provide a defined
set of public colors.

For reference, see: https://github.com/GNOME/gtk/blob/master/gtk/theme/Adwaita/_colors-public.scss
2019-04-21 01:32:26 +01:00
Manuel Genovés 9bf30143d1 Merge branch 'refi64-flatpak' into flatpak-improvements 2019-04-20 18:24:36 +02:00
Manuel Genovés 3d26dc2b25 flatpak improvements 2019-04-20 18:24:21 +02:00
somas95 c2b5116a46
Merge pull request #147 from UberWriter/various-improvements
Various improvements
2019-04-20 13:34:57 +02:00
somas95 f2d00f2f0d
Merge pull request #146 from goncalossilva/ft.stats
This PR improves statistics counting, as well as adds support for more of them, fixing #63. It does so in a iA Writer inspired way, meaning:
* The stats bar displays one stat, word count by default.
* The stats bar now contains a button that [displays all stats and allows toggling between them](https://cl.ly/a0ce3fad3d72/gnome-shell-screenshot-QRNG0Z.png).
* The default stat is saved between sessions.
* All the stats are objective and deterministic. For instance, I contemplated adding GhostWriter's "Pages" estimation, but it's outright broken in my testing, and I also think we should be strict about what too include. Too many things will make it less useful. Regardless, it's trivial to extend.
* Calculations are done on a worker thread, to prevent hogging the UI and allowing future extensibility without much consideration.
2019-04-20 13:21:37 +02:00
Ryan Gonzalez 32bb70a261 Flatpak fixes (ref. #111) 2019-04-19 13:06:13 -05:00
Manuel Genovés f466171eda print correct folders 2019-04-19 14:39:06 +02:00
Manuel Genovés dc4c4d9c2c update flatpak json 2019-04-19 14:02:57 +02:00
Manuel Genovés 8e5ccfc01d preserve the /data/media folder structure 2019-04-19 14:02:39 +02:00
somas95 2b5140dada
Merge pull request #144 from goncalossilva/various-improvements
Fix opening recents popover affecting font size
2019-04-19 13:29:09 +02:00
Gonçalo Silva dccc645430 Add paragraphs stat 2019-04-19 11:26:21 +01:00
Gonçalo Silva f6c62fb459 Tooltip capitalization fix 2019-04-19 11:23:16 +01:00
Gonçalo Silva c19f57f64b Add statistics for sentences and read time, allow user to toggle default
Fixes #63
2019-04-19 11:23:16 +01:00
Gonçalo Silva e76b85e837 Add official markdown mime type support in Recents 2019-04-19 11:23:16 +01:00
Gonçalo Silva 1a7443fd3c Switch to a more powerful and accurate stats counter
The new stats counter is able to count characters, words, sentences, and
reading time.

It does so more accurately than before, by leveraging Pandoc's plain
format, and a few simple regular expressions that besides accuracy, also
improve support for Asian languages. It's all done on a background
thread to avoid hogging the UI.
2019-04-19 11:23:16 +01:00
Gonçalo Silva dfe7cc420e Fix opening recents popover affecting font size 2019-04-19 00:00:33 +01:00
Manuel Genovés ec3dc6d632 Merge branch 'various-improvements' of https://github.com/wolfv/uberwriter into various-improvements 2019-04-17 22:30:05 +02:00
Manuel Genovés 21e27eaaf0 fix paths 2019-04-17 22:27:06 +02:00
Manuel Genovés d3c9b81fe8 Merge branch 'various-improvements' of https://github.com/wolfv/uberwriter into various-improvements 2019-04-17 22:18:08 +02:00
somas95 d99e4c65f9
Update setup.py 2019-04-17 22:17:42 +02:00
Manuel Genovés f67eaedcb6 fix binary path 2019-04-17 22:14:10 +02:00
Manuel Genovés 6baa398995 fix binary path 2019-04-17 21:57:51 +02:00
Manuel Genovés 83c15361ea v2.2.0-beta1 install scripts 2019-04-17 21:34:49 +02:00
Manuel Genovés 96865fbefc mockup update 2019-04-17 20:45:17 +02:00
somas95 f5d7f518fa
Merge pull request #143 from goncalossilva/various_improvements
This PR includes various fixes and improvements, most of which I discussed with @somas95 a couple of weeks ago. It also includes some refactoring, mainly to improve encapsulation.

Fixes #17  
Fixes #75 
Fixes #90 
Fixes #120
Fixes #122

Some considerations/questions follow.

**Commit messages**
I recommend reviewing each commit message carefully, as they explain the thinking behind each change. Not everything is small or linear, and hopefully the commit message explains the background and reasoning properly. If anything is missing, I'm happy to try to explain.

**Translations**
There are a few capitalization/copy fixes. I am unsure how this affects translations, or if there's any work I can to make the transition easier. For instance, how are the po files updated?

**Styling**
Styling is subjective, and although I claim to address #90, it's important to note that I'm a fan of UberWriter's simplistic style, reminiscent of iA Writer's approach. As such, I didn't introduce any sizing nor color changes, as I don't personally agree with this direction. Instead, the changes are subtle:
* For links, the link/syntax part is greyed out, without any further changes
* For code blocks, they are indented similarly to quotations, without any further changes

**UI changes**
There are (very minor) UI changes within the places that were touched, mainly preferences and the export dialog. Most of these are around improving small things, such as spacing (eg. multiples of 8), slightly broken alignments, etc.

The only exception would be the removal of ODT as one of the export options in the top bar. As before, subjective, but I find that a sub-window's top bar with 6 horizontal buttons is a little overwhelming, and considering that ODT is still available within the advanced tab, I propose that we remove it as a default option and have a more balanced top bar. I am assuming that PDF/HTML are the most used, but please let me know if that's not the case.

**Further work**
I have a few more tasks planned for the upcoming weeks, hopefully built on top of this codebase as it makes some of them much easier. [Here's a screenshot of my Todoist.](https://cl.ly/4160755d210d/gnome-shell-screenshot-3MMO0Z.png) Hopefully this helps knowing what to expect. 😊
2019-04-17 20:44:18 +02:00
Gonçalo Silva 432ef9d55e Set tooltips on the whole button, not just the icon 2019-04-17 02:54:55 +01:00
Gonçalo Silva 53d3fc6026 Use symbolic icon for input format documentation 2019-04-17 02:52:56 +01:00
Gonçalo Silva 567e74c99e Fix active search going out of bounds 2019-04-17 02:15:59 +01:00