Magnus Hovland Hoff
0a64a274ac
Bugfix. Anonymous edits would have a stray period.
2018-10-07 13:54:09 +02:00
Magnus Hovland Hoff
ccbabb86f8
Make theme optional when updating articles.
...
This makes sense from an API design perspective
2018-10-05 13:07:19 +02:00
Magnus Hovland Hoff
09c68c5993
Select random theme for new articles server side.
...
This supports user agents with disabled javascript (noscript)
2018-10-05 11:56:53 +02:00
Magnus Hovland Hoff
7373af0417
Select random theme for new articles client side
2018-10-05 11:19:47 +02:00
Magnus Hovland Hoff
65ad262bd8
Bugfix.
...
Cancel button is always disabled and shown conditionally
2018-10-05 11:03:41 +02:00
Magnus Hovland Hoff
cffcc93b15
Add tests for automatically slugged links
2018-10-03 22:35:47 +02:00
Magnus Hovland Hoff
575c18f915
Support automatically slugged links
2018-10-03 18:24:55 +02:00
Magnus Hovland Hoff
6d1c9967aa
Correctly mark unused variable
2018-10-03 18:12:27 +02:00
Magnus Hovland Hoff
748459483e
Show author for diffs that show only one changeset
2018-10-02 08:44:06 +02:00
Magnus Hovland Hoff
01ceda8015
Use correct number for generating pagination link
2018-10-01 22:58:40 +02:00
Magnus Hoff
16384c9f83
Inconsequential change to trigger CI pipeline
2018-10-01 10:03:24 +02:00
Magnus Hovland Hoff
d5410f2a22
Revert focusing the body text editor when entering edit mode.
...
This behaves badly in multiple mobile browsers, causing confusion. Perhaps it is better to disable this feature altogether
2018-10-01 09:02:55 +02:00
Magnus Hovland Hoff
17c23da9bf
Better scroll handling when toggling editing.
...
It will now retain the scroll position relative to the full document height when entering and leaving editing mode. This places the viewport closer to the contents you were watching. This is likely less disorienting
2018-10-01 09:01:27 +02:00
Magnus Hovland Hoff
619ba14b3f
Fix editor controls layout in narrow layout
2018-10-01 08:36:44 +02:00
Magnus Hoff
58283a601c
Also disable form elements via CSS pointer-events when not in edit mode.
...
This lets us visually transition the controls without accidentally enabling interaction
2018-09-30 22:33:40 +02:00
Magnus Hoff
c6dd37ed9e
Centralize handling of form elements state handling.
...
This makes it easier to maintain state changes. Seems to handle all states well now
2018-09-30 22:30:52 +02:00
Magnus Hoff
85014d2789
Include theme in response when creating new article.
...
Bug caused by duplication of code.
2018-09-30 22:29:37 +02:00
Magnus Hovland Hoff
a81a568ee2
Forward the edit-state when redirecting to renamed articles.
...
This improves usability with noscript
2018-09-24 23:01:01 +02:00
Magnus Hovland Hoff
e92c9695be
Fix editing of new articles with noscript.
...
This also generalizes the code. Neat!
2018-09-24 22:55:10 +02:00
Magnus Hovland Hoff
0439ca0d8e
Avoid storing build cache in travis,
...
it costs more than we gain
2018-09-24 18:30:17 +02:00
Magnus Hovland Hoff
62378007b1
Reset theme when editing is canceled
2018-09-24 18:21:50 +02:00
Magnus Hoff
3bbe5840ee
Implement theme picker UI
2018-09-24 08:43:36 +02:00
Magnus Hovland Hoff
baaab6ebc8
Store theme explicitly in database. Propagate theme both ways between db and frontend
2018-09-23 22:38:18 +02:00
Magnus Hovland Hoff
fe0011e757
Allow build.rs to figure out the correct database schema
2018-09-23 21:39:54 +02:00
Magnus Hovland Hoff
828490df3b
Update serde_urlencoded dependency for bugfix
2018-09-23 21:39:09 +02:00
Magnus Hovland Hoff
c1fcc80cf0
Minor fix for making Theme insertable with Diesel
2018-09-23 21:38:17 +02:00
Magnus Hovland Hoff
8f1e95bdde
Add theme to ArticleRevisionStub, RebaseResult and related.
...
This paves the way for explicitly storing the theme in the database
2018-09-22 23:16:58 +02:00
Magnus Hovland Hoff
c82228f019
Propagate theme in ArticleRevisions from the state struct
2018-09-21 08:57:35 +02:00
Magnus Hovland Hoff
b777a92a48
Expose theme_from_str_hash to SQL.
...
To be used in a db migration for storing the previously implicit value
2018-09-20 23:17:25 +02:00
Magnus Hovland Hoff
ca1e072d9b
Add more tests for using Theme with the database
2018-09-20 08:37:27 +02:00
Magnus Hovland Hoff
df066c611d
Add support for using Theme with the database
2018-09-19 22:56:12 +02:00
Magnus Hovland Hoff
f961699f0f
Rename function to avoid confusion
2018-09-19 08:20:43 +02:00
Magnus Hovland Hoff
6118f14bb0
Explicitly set theme for layout.
...
Refactoring in anticipation of letting the user choose theme
2018-09-18 23:11:25 +02:00
Magnus Hovland Hoff
c1dcb1de64
Make responsibility for converting a theme to a css class to the theme module
2018-09-18 19:43:33 +02:00
Magnus Hovland Hoff
d4e8277f2a
Dependency for previous commit
2018-09-18 19:21:36 +02:00
Magnus Hovland Hoff
a65e85f242
Refactor Theme handling to a new module.
...
Fundamentals for communicating about themes with the database and over http
2018-09-18 07:56:58 +02:00
Magnus Hovland Hoff
ecf4c1e98e
Disable save hotkey when it is not appropriate
2018-09-16 22:31:57 +02:00
Magnus Hovland Hoff
534dffdfe3
Show disabled cancel button instead of removing it.
...
This fixes two problems caused by the removal of the button: Broken layout and broken JS
2018-09-16 22:25:28 +02:00
Magnus Hovland Hoff
999253a778
Place text caret at end of text to reduce visual distraction caused by stuff moving around
2018-09-16 12:16:03 +02:00
Magnus Hovland Hoff
a00cdf6394
Position editor controls with units that are affected by the scroll bar
2018-09-16 12:10:02 +02:00
Magnus Hovland Hoff
8d86e8937a
Capitalize placeholder in search input.
...
I think I like this better
2018-09-16 12:06:20 +02:00
Magnus Hovland Hoff
830f641167
Fine-tune margin
2018-09-13 08:48:09 +02:00
Magnus Hoff
d6e1015197
Reset style for Safari to make transition between view and edit more seamless
2018-09-11 19:53:14 +02:00
Magnus Hoff
9c67333b87
Wider top margin for better visual balance
2018-09-11 19:19:22 +02:00
Magnus Hovland Hoff
7b1a0256e1
Add rainbow bar to test-themes
2018-08-31 21:30:46 +02:00
Magnus Hovland Hoff
94db59c44c
Add hotkey for saving
2018-08-22 08:14:25 +02:00
Magnus Hovland Hoff
42e7857fcd
Revert "Attempt to improve overscroll in Apple browsers"
...
This reverts commit 0847cb5c4d
.
2018-08-21 21:57:40 +02:00
Magnus Hovland Hoff
0847cb5c4d
Attempt to improve overscroll in Apple browsers
2018-08-21 19:06:53 +02:00
Magnus Hovland Hoff
b8da0ff753
Fix breakpoint size for editor controls
2018-08-21 19:02:38 +02:00
Magnus Hovland Hoff
096da6ef38
Iterate on editor controls design
2018-08-21 18:40:44 +02:00