Coder Social home page Coder Social logo

docelic / fluence Goto Github PK

View Code? Open in Web Editor NEW
46.0 8.0 1.0 3.75 MB

WYSIWYG wiki powered by Crystal, markdown, and Git

License: GNU General Public License v3.0

Makefile 1.23% Crystal 94.77% JavaScript 1.82% CSS 2.18%
wiki wiki-engine wysiwyg markdown tables media crystal-lang wysiwyg-editor markdown-editor

fluence's People

Contributors

docelic avatar veelenga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

destructed3

fluence's Issues

Handle issue with empty directories

When a directory contains pages, it appears as a non-clickable folder in the index.
But when it is empty, then it appears as an empty page.

Code should be changed so that empty directories get transparently removed.

Improve and make more usable the idea of having inter-page links with [[page]]

The wiki already supports internal links via [[page]].

This model should be made more prominent and useful within the whole user interface.

(E.g. below the ToC there could be 3 lists -- one as a collection of links to internal pages, one as a collection of external links, and one as a collection of referenced files from the internal media library)

Add support for layout placeholders

When support for layout placeholder is added, use them to put 'var uploader =' from show.slang in them, and dump those contents before the closing body tag.

Also, above it, put all the inscrybmde includes that should be moved from the top of application layout to there.

Rebuild/update Index on restart

Currently, index is read from file ./meta/index.

On Wiki startup, there should be options to rebuild the index and/or check information for freshness.

(For example, actions made by users writing files directly on the filesystem should be visible in the Index after restart, such as adding and deleting pages, or modifying pages and affecting the list of internal links.)

Add better control of editor default state (edit vs. preview)

On show.slang, allow sending a parameter which says whether the editor should be initialized in edit or preview mode.

Links pointing to edit mode should be used by default for pages which do not exist.

Maybe also upon Save as well if the editor was in Edit mode when Save was clicked.

Add ability to upload media

We should add the ability to automatically upload media to a web-accessible location and insert a link to it in the wiki page, and/or to be able to insert links to any media already existing/uploaded to the media gallery.

Join sitemap and mediamap?

Currently, pages /sitemap and /mediamap show hierarchies of wiki pages and any of their attached media.

Maybe it would make sense to join the two pages in one.

E.g. so that /sitemap is a split screen showing wiki pages in the left pane, and media files in the right pane.

Alternatively, media files could appear directly under the entries in the sitemap, under the individual wiki pages to which they are attached.

Change ordering in sitemap

In sitemap, shown on the left of every page, the display of pages and subpages should be adjusted.

If a page has subpages, two things should be done:

  1. There should be only one entry for the main page, instead of currently existing one entry for the page, and one for its directory which contains subpages

  2. The ordering should be such that pages and its subpages are listed first (before listing further pages), instead of all pages first and all directories second

Fix login with nonexistent username

Currently, logging in with a non-existent username results in an application error in Kemal, rather than being gracefully handled within the application.

This should be handled in the same way how a username/password mismatch is reported to the user.

Add support for searching media

When media support is added (#2), the existing search function should be updated to include media files in the search.

If FileTree is used for search, this might even work automatically since both pages/ and media/ are found under Fluence::OPTIONS.basedir, which if I am correct, is the basis for search.

Fix tests

Fluence works, but the tests are failing due to old/unupdated test code.

Update internal links when a page is moved

When an existing page is moved to a new location, internal links need to be rewritten to the new location.
This comes down to finding matching internal links in the on-disk pages and modifying them.

Add per-user settings

Registered users should be able to have a "profile" and own settings.

Examples of settings to configure per-user would be:

  • Use edit or view mode by default
  • Use fullscreen and/or side-by-side by default
  • Autosave interval
  • Color scheme

Make page ToC work again

Currently the ToC does not work as a consequence of moving from Index of Index::Entries to Index of Pages.

Change icons in the editor toolbar based on mode (edit or preview)

We should change the toolbar icons depending on whether the page is in edit or preview mode.

Two things should be done here:

  1. Figure out if there is a way to immediately open the editor in preview mode. (Currently we do this by manually invoking togglePreview() after the editor has initialized itself in edit mode)

  2. Figure out if the editor can be configured to automatically change the icons based on mode.

If it can't be configured to automatically change, then we need to implement it ourselves:

First we should see whether Inscryb/inscryb-markdown-editor#17 is a bug or not. That is, whether we can easily test whether the editor is in preview mode or not.

Then, one option (possibly not very favorable) would be to destroy the toolbar and create it anew with different icons when mode is changed. We have a prototype of this working, but it currently does not properly create a toolbar when editor is in full screen mode (this is probably another bug in SimpleMDE/InscrybMDE).

Another option (not tested yet) would be to modify the toolbarComponents array to take out and bring back individual icons when mode is changed. Hopefully the editor.render() method would work correctly and we'd have no other work than just adding or removing toolbar objects from that array.

Add I18n

This is a lower priority task, but at some point we should add I18n support.

Available options are:

https://github.com/akzhan/crystal-cldr
https://github.com/olbat/icu.cr
https://github.com/TechMagister/i18n.cr (and related https://github.com/TechMagister/kemalyst-i18n)

@imdrasil has done some work on I18n, we should check if something new can be found in the list of his repositories.

Also people interested in this should read amberframework/amber#56 for general introduction to I18n challenges in Crystal projects.

Change default mode (preview or edit) based on page existence

Decide whether it would be useful to open new pages in edit mode by default, while existing pages would open in preview by default.

Currently, when a person visits a nonexistent page, if they have permissions to create pages, then they are presented with a notice that the page does not exist yet, and an empty page body. From there, if they really wanted to create a new page, they could enter Edit mode, type in page content, and click Save.

This change would make it so that new pages are open in Edit mode automatically, saving a click.

A potential drawback is that if a person was actually looking for an existing page and not intending to create a new one, then not only would they be informed that the page does not exist, but they would also find themselves in Edit mode, which may be even further from what they originally intended.

It would probably make sense to just save the desired behavior as a user preference.

Perm-related visual changes

  • If user has no permission to edit page, don't open Edit mode
  • Similarly, don't show file upload functionality

Concatenated pages?

In addition to page titles, internally we also convert titles to slugs which can be used in URLs.

So, with a page title "My Page Title", this page could theoretically also be accessible via an URL /titles/my_page_title.

There is an idea that in such case, if multiple pages are found, we could concatenate their contents.

For example, if a team of 5 people all create a page named /USERNAME/calendar, then visiting /titles/calendar would combine the pages and display all 5 calendars at once.

Comments welcome.

Fix parsing of ToC from pages

Currently, everything that says "# ... " gets parsed as a heading, even if it is found inside code or blockquote blocks.

This should be fixed.

Add ability to search in file contents

Searching in file contents could be done by e.g. using a grep-like approach, or to use a database like ElasticSearch for search.

In the spirit of using files (which we currently do), probably grep would be more in tune with what users would expect from a file-based wiki.

Comments welcome.

Storage backend - files or database?

Please provide your comments as to whether you prefer Fluence to keep using file-based storage versioned using Git (like it does now), or we should switch to a database-powered model.

Add option to delete pages by saving with empty content

Currently, in pages_controller 2 lines of code have been commented, which would otherwise delete a page when it is saved with empty content.

Whether saving a page with empty content should mean a request for deletion should be added to user preferences, and then delete or not based on that.

Attachment improvements

  1. Show newly attached files in the list dynamically, without having to reload page to see them
  2. Re-style the current ol/li list of attachments and add Download and Delete buttons to each entry
  3. Download option should sent Content-Disposition: attachment; in the response header

Save content to pages

Currently, Page objects are pretty much disposable. One mostly creates them just to convert a page name into a Page object and then access page-specific functions.

We need to change this so that these objects can also be non-disposable and contain the complete page content in them. Then, PAGES index would be a collection of pages all of which have the content embedded and don't require disk access.

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.