* Begin adding support for timeline
* fix some bugs with parser
* fmt
* add error reporting for parser
* add tests for timeline query parser
* add rejection tests for parse
* begin adding support for lists
also run migration before compiling, so schema.rs is up to date
* add sqlite migration
* end adding lists
still miss tests and query integration
* cargo fmt
* try to add some tests
* Add some constraint to db, and fix list test
and refactor other tests to use begin_transaction
* add more tests for lists
* add support for lists in query executor
* add keywords for including/excluding boosts and likes
* cargo fmt
* add function to list lists used by query
will make it easier to warn users when creating timeline with unknown lists
* add lang support
* add timeline creation error message when using unexisting lists
* Update .po files
* WIP: interface for timelines
* don't use diesel for migrations
not sure how it passed the ci on the other branch
* add some tests for timeline
add an int representing the order of timelines (first one will be on
top, second just under...)
use first() instead of limit(1).get().into_iter().nth(0)
remove migrations from build artifacts as they are now compiled in
* cargo fmt
* remove timeline order
* fix tests
* add tests for timeline creation failure
* cargo fmt
* add tests for timelines
* add test for matching direct lists and keywords
* add test for language filtering
* Add a more complex test for Timeline::matches, and fix TQ::matches for TQ::Or
* Make the main crate compile + FMT
* Use the new timeline system
- Replace the old "feed" system with timelines
- Display all timelines someone can access on their home page (either their personal ones, or instance timelines)
- Remove functions that were used to get user/local/federated feed
- Add new posts to timelines
- Create a default timeline called "My feed" for everyone, and "Local feed"/"Federated feed" with timelines
@fdb-hiroshima I don't know if that's how you pictured it? If you imagined it differently I can of course make changes.
I hope I didn't forgot anything…
* Cargo fmt
* Try to fix the migration
* Fix tests
* Fix the test (for real this time ?)
* Fix the tests ? + fmt
* Use Kind::Like and Kind::Reshare when needed
* Forgot to run cargo fmt once again
* revert translations
* fix reviewed stuff
* reduce code duplication by macros
* cargo fmt
* initial RTL support
* fix dir in template-util
* fix dir in blogs new
* fix dir in blogs details
* fix dir in posts new
* fix dir in posts details
* fix dir in posts remote
* Fix dir in partials
some parts should be recheck carefully in real usage
* Start to update the theme
- Ligther colors
- No more border radius
- Buttons are now always colored
- Start to redesign the post page (according to the Figma mockups)
* Fix build script: it now recompiles everytime a scss file changed
* Make sure the article illustrations are not too big
* Make articles wider (70 characters)
* Better contrast between gray shades
* Various improvements
* Better mobile style
* New style for the footer
* Improve comment style
* Better responsiveness again
* Limit the size of the article cover
* Last details?
- Improve buttons on the media page
- Improve lists
* Pin the stdweb version that we use
It changed because I removed Cargo.lock to handle a merge conflict
I could have updated cargo web too, but it mean I should have re-built
the CI docker image and it was taking forever.
* Better contrast for links in the header of the article
* Add a basic privacy policy
* Remove "also"
* Fix a few issues
- Don't watch static/css in build.rs
- Another shade of white
- Remove useless margin rule for error messages
* Update some UI strings for more natural English
* Correct message text
* Correct message text
* Update the strings everywhere
Because they are also used as base messages for other languages
Also adds a parameter to `md_to_html` to only render inline elements (so that we don't have titles or images in blog descriptions). And moves the delete button for the blog on the edition page.
I still have to update the SQLite migration once others PRs with migrations will be merged.
Also, there will be a problem when you edit a blog while not owning its banner or icon: when validating they will be reset to their default values… I don't see a good solution to this until we have a better way to handle uploads with Rocket (the same is probably happening for articles btw).
And the icon/banner are not federated yet, I don't know if I should add it to this PR or if it can come after?
![image](https://user-images.githubusercontent.com/16254623/53894510-7d853300-4030-11e9-8a2c-f5c0b0c7f512.png)
![image](https://user-images.githubusercontent.com/16254623/53894539-8b3ab880-4030-11e9-8113-685a27be8d7c.png)
Fixes#453Fixes#454
We add clippy as our build — also rectifying the missing `plume-cli` build!
In the next step we follow clippy's advise and fix some of the "simple" mistakes in our code, such as style or map usage.
Finally, we refactor some hard bits that need extraction of new types, or refactoring of function call-types, especially those that thread thru macros, and, of course functions with ~15 parameters should probably be rethought.
* Slightly improve the media experience
- Use a grid to display the list of media
- Add icons for non-image media preview
- Paginate the gallery
- Add links to the gallery in the editor and in the profile settings to make it more discoverable when you need it
Fixes#432
* Allow video and audio tags in SafeString
Otherwise we can't display their preview, nor show them in articles
Also show controls by default for these two elements
* Show fallback images for audio and unknown files, to make them more visible
* Add a new constructor to SafeString when the input is trusted and doesn't need to be escaped.
And use it to generate media previews.
* Make it possible to insert video/audio in articles
- Use `Result` as much as possible
- Display errors instead of panicking
TODO (maybe in another PR? this one is already quite big):
- Find a way to merge Ructe/ErrorPage types, so that we can have routes returning `Result<X, ErrorPage>` instead of panicking when we have an `Error`
- Display more details about the error, to make it easier to debug
(sorry, this isn't going to be fun to review, the diff is huge, but it is always the same changes)
Add some support for comment visibility, fix#217
This add a new column to comment, denoting if they are public or not, and a new table linking private comments to those allowed to read them. There is currently no way to write a private comment from Plume.
Git is having a hard time what happened in Comment::from_activity, but most of it is just re-indentation because a new block was needed to please the borrow checker. I've marked with comments where things actually changed.
At this point only mentioned users can see private comments, even when posted as "follower only" or equivalent.
What should we do when someone isn't allowed to see a comment? Hide the whole thread, or just the comment? If hiding just the comment, should we mark there is a comment one can't see, but answers they can, or put other comments like if they answered to the same comment the hidden one do?
* Count items in database as much as possible
* Fix the tests
* Remove two useless queries
* Run pragma directive before each sqlite connection
* Pragma for tests too
* Remove debug messages
Use uri! to generate links instead of hardcoded urls
Fix#110
Fix invalid links needing to be POST forms
Translate login message for boost and like directly from template
Put js for search in its own file
All the template are now compiled at compile-time with the `ructe` crate.
I preferred to use it instead of askama because it allows more complex Rust expressions, where askama only supports a small subset of expressions and doesn't allow them everywhere (for instance, `{{ macro!() | filter }}` would result in a parsing error).
The diff is quite huge, but there is normally no changes in functionality.
Fixes#161 and unblocks #110 and #273