Coder Social home page Coder Social logo

z3's People

Contributors

dependabot[bot] avatar gwbasic avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

z3's Issues

Clean up editor view

Clean up the editor view so that more of the editor fits on screen.

The current problem with the editor is that the global navigation bar, editor links, and then editor toolbar, take up too much space on screen.

In this ticket: Figure out how to use less horizontal space so more screen gets dedicated to the editor itself.

Sharing buttons

Buttons to share on Facebook, Twitter, LinkedIn, and Hacker News, would be useful!

500 Error when publishing (img tag has no src after upload)

I recently encountered a 500 error when publishing a post. Upon closer inspection, an img tag had no src after the image was uploaded.

From the log:

2020-06-05T15:22:30.208817+00:00 app[web.1]: Unhandled error POST /publish/5: TypeError: Cannot read property 'startsWith' of undefined
2020-06-05T15:22:30.208837+00:00 app[web.1]: at Object.exports.extractImages (/app/z3.js:205:25)
2020-06-05T15:22:30.208838+00:00 app[web.1]: at /app/routes/publish.js:131:53
2020-06-05T15:22:30.208839+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:97:5)

The code:
` const originalSrc = imageElement.attribs.src;

    if (originalSrc.startsWith(filterPrefix)) {`

My steps:

  1. Create a new blog post
  2. Do not edit the post in any way
  3. Drag and drop an image file into the editor
  4. Publish

This triggered a 500 error.

But, then on closer inspection:

  1. Create a new blog post
  2. Do not edit the post in any way
  3. Drag and drop an image file into the editor
  4. Switch to the HTML view
  5. Observe that the img tag has no src value

Preview does not resize images

When viewing the preview of a blog entry, images are not resized.

Instead, images are shown at their full size.

Expected behavior: Show resized images just like the published blog entry

Hide the header when editing

When editing a blog post, the header and footer take up a lot of screen real estate. They should be able to be hidden. In such a situation, only the content specific to the editor will be visible.

Allow viewing a preview with a password

One thing that's useful is allowing other people to view a preview of a blog post.

To do this, allow viewing a preview with a password.

OR: Allow connecting a Facebook account and allowing viewing a preview with a Facebook account.

Allow uploading arbitrary media

In the editor, add an "upload" button that allows uploading arbitrary media. (Video, audio file)

Then have a way to insert the media into the post.

Enable a "login" link by default

It's confusing that the blog has no "login" link.

A "login" link should be enabled by default, and then optionally disabled on the configuration page.

Preview a blog post or draft

The editor was originally intended to be WYSIWYG, but there are enough differences between the editor and final view that a preview button is ideal.

For this enhancement:

  • Implement a draft preview page: /draft/:draftId and /draft/image/:imageId
  • Refactor / use code in z3 to ensure that images are shown at their appropriate width
  • Link to this page on the editor and the drafts view page

Editor resizes when looses focus

When editing a blog post, if the editor looses focus, the editor shrinks.

To reproduce:

  1. Create a new blog post / edit an existing blog post
  2. Resize your window so it's tall. (Use a large monitor, make the window fill the screen)
  3. Select another tab or window
  4. Return to the editor

Observe that the editor shrunk.

(Reproduced with Chrome on Mac)

Site breaks when pogon.html uses cheerio 1.0.0-rc5

When pogon.html uses cheerio 1.0.0-rc5, requests fail with the following error:

TypeError: Cannot read property '_options' of undefined at exports.html (/Users/andrewrondeau/git/z3/node_modules/cheerio/lib/static.js:133:10) at initialize.exports.html (/Users/andrewrondeau/git/z3/node_modules/cheerio/lib/api/manipulation.js:697:12) at merge (/Users/andrewrondeau/git/z3/node_modules/pogon.html/pogon.html.js:217:40) at Object.exports.render (/Users/andrewrondeau/git/z3/node_modules/pogon.html/pogon.html.js:89:8) at async View.exports.renderFile [as engine] (/Users/andrewrondeau/git/z3/node_modules/pogon.html/pogon.html.js:185:20)

I'm not sure if that's a cheerio bug or a problem with pogon.html. For now, forcing pogon.html to use an older version of cheerio.

Can't edit a title

It appears that edits to the title are ignored.

To reproduce:

  1. Create a blog entry with no title
  2. Edit the title
  3. Edit the text
  4. Preview it

Observe that the title is still blank

Expected:

  • I should not be able to create a blog entry with a blank title
  • Changes to the title should apply

Lock to HTML when CKEditor will remove tags

A problem with CKEditor is that it removes unrecognized tags, like <form>. If someone adds custom HTML to a blog post, it will be cleared out as soon as the blog post is edited in WYSIWYG.

To reproduce:

  1. Create / edit a blog post
  2. Select "HTML" at the bottom of the screen
  3. Add a form:
  4. Switch back to WYSIWYG
  5. Switch back to HTML

Observe that the form is removed

In this bug:

  1. In the editor, detect that a blog entry has unsupported HTML
  2. Don't allow switching back to WYSIWYG
  3. Default to HTML when the editor is opened

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.