Page MenuHomePhabricator

Images
ClosedPublic

Authored by WyldBot on May 20 2018, 1:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jan 31, 12:13 PM
Unknown Object (File)
Mon, Jan 30, 9:25 AM
Unknown Object (File)
Mon, Jan 30, 9:25 AM
Unknown Object (File)
Mon, Jan 30, 6:29 AM
Unknown Object (File)
Fri, Jan 20, 2:37 PM
Unknown Object (File)
Fri, Jan 20, 2:37 PM
Unknown Object (File)
Sat, Jan 14, 3:36 PM
Unknown Object (File)
Jan 4 2023, 6:25 AM

Details

Summary

Updates regex for drafts, userposts, and create usecases
Implements comment validation
Implements new creation and mini-creation editor button for images
Changes current picture system for posts and comments to support images on posts and comments
Adds additional images within the fold for posts
Ensures there are no duplicates, hot links, or too many images within posts and comments
Auto removes hot links on posts and comments, does not auto remove duplicates
Lefts align post.text
Changes markdown engine from marked to markdown-it
New custom image markdown for user uploaded images
Old image markdown is no longer supported
Makes post and comment images smaller on larger screens
Updates NOTICE file for new copyrights

Fixes T133, T204

Test Plan

Make a post with no images
Make a post with images
Make a comment with an image
Make a comment without an image
Save drafts
Delete drafts
Delete post from postview

Make a comment and post with invalid markdown(hotlinks, duplicates, etc)
`[![undefined](https://static.wildfyre.net/wildfyre.png "undefined")](https://static.wildfyre.net/wildfyre.png)fg
cgvbhncfgh
![undefined](https://static.wildfyre.net/wildfyre.png "undefined")fgdfgd cfghghjfghjfghjfghjfghjfghjfghjfghj
vhnjm,gvhj
![undefined](https://static.wildfyre.net/wildfyre.png)fg
dfgh
h ![](https://static.wildfyre.net/wildfyre.png)fg
fgh
y[![undefined](https://static.wildfyre.net/wildfyre.png "undefined")]fg
y[![undefined](https://static.wildfyre.net/wildfyre.png "")]fg
fg
! [undefined] (https://static.wildfyre.net/wildfyre.png "undefined" ) ]
https://static.wildfyre.net/wildfyre.png fg
`

Diff Detail

Repository
rWCL Web Client
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Client side filter implemented, Still to add/fix: comment images, hotlink auto removal, and fix when not a draft

Just have to add automatic hotlinking removal, and copy code from postview to home

Final diff before phabricator review

WyldBot edited the summary of this revision. (Show Details)

Left align posts

Added comment data to the bottom of images

Comment input validation

WyldBot edited the test plan for this revision. (Show Details)
  • Duplicate Regex /\[?(!\s*\[[^\]]*\]\s*\((.*?)\s*("(?:.*[^"])?")?\s*\))\s*\]?\s*(?:(\(.*?\)))?/g: 10 times
  • Images are way to big on desktop
  • The upload uri is not guaranteed to stay this way (chances are actually pretty high that it won't), do not post the exact image location to the api.

It would be best to add a new tag (e.g. [img:<id>] and then configure the marked parser and lexer to understand that tag and pull the required information form the additional_images array (see: https://marked.js.org/#/USING_PRO.md)

This revision now requires changes to proceed.Jun 6 2018, 10:34 PM
WyldBot edited the summary of this revision. (Show Details)
WyldBot edited the summary of this revision. (Show Details)
src/app/home/home.component.html
60

Target _blank

src/app/postView/postView.component.html
58

Target blank

src/app/userPosts/userPosts.component.ts
81

Add wf image markdown like notification archive

Removed uneeded constructor

  • Image in attachment area is way to big. Crop them down.

Could we edit the error a bit. Inform the user that they try to insert an image that doesn't exist etc not just say the "markdown does not exist".

src/app/_models/constants.ts
3

use \d* to allow larger image nums (unlikely to happen but not excluded by docs)

and I don't really like that there has to be a space.

3

multiline flag seems not useful here

src/app/home/home.component.html
60

Consider adding rel="noopener noreferrer" to avoid later copy paste issues (and it might also bring some small performance benefits).

Same for other uses of target.

This revision now requires changes to proceed.Jun 17 2018, 9:13 PM
This revision is now accepted and ready to land.Jun 18 2018, 12:00 PM
This revision was automatically updated to reflect the committed changes.