GithubHelp home page GithubHelp logo

joomlatools / joomlatools-framework-files Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 5.62 MB

Files System Component for Joomlatools Framework.

Home Page: https://www.joomlatools.com/developer/framework/

License: GNU General Public License v3.0

PHP 13.39% JavaScript 63.95% CSS 19.92% SCSS 2.75%
framework

joomlatools-framework-files's People

Contributors

amazeika avatar ercanozkaya avatar jebbdomingo avatar johanjanssens avatar mathiasverraes avatar rmdstudio avatar robinpoort avatar stipsan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

rmdstudio

joomlatools-framework-files's Issues

Allow route overrides for direct linking through template filtering

The idea is to have a mechanism to override routes of direct file URLs served by files, e.g. thumbnails. This allows each app running files to override how this paths are constructed at render time.

An implementation example is rendering thumbnails link on FILEman on Joomla vs Platform. Platform requires the web part of the path to be stripped as it's part of the document root.

NOTE

This filter is to replace this utility method https://github.com/joomlatools/joomlatools-framework-files/blob/master/filter/path.php#L117-L128

Make sure to remove this code and places where this is being used after implementation.

Switching between gallery and list UI

Small thumbnails on list view aren't rendered when switching the layout. A refresh is needed for these to appear.

When uploading a file while on the list layout, the thumbnail isn't set when the file is uploaded. A refresh is also needed in this case.

Uploader drag and drop flickering

Session storage issue on chrome

The component keeps a copy of image data on the browser session storage container. However, it would seem that chrome may have reduced the maximum amount of allowed data that can be put into it.

We have a report of chrome deliberately refusing to put any more data on it:

See:

Solution is to remove this functionality to avoid running into such problems.

Supporting Mimetypes

Components that extend this framework may need a mimetype => extension map. Implement models, entities, and behaviours needed for the child classes to access this mimetype map.

Note: this feature will be used in DOCman

Improve files app thumbnails handling performance

The app currently fetches all thumbnails from each returned file and then picks the one it needs. This can be heavy especially when done the very first time (when thumbs get created).

Instead we should make the app grab the thumbnail it needs to reduce page loads.

Add abstract routable behavior

Almost all extensions using com_files needs to use a routable dispatcher behavior. Make an abstract routable behavior to reduce duplicate code.

Folder not found exception

Instead of throwing an exception the model should just return an empty rowset when fetching files via the files model on a non-existing folder.

Error on history.js

History.js is throwing a JS error under some conditions.

History.unescapeString function keeps decoding URLs on a while block using window.decodeURI. This function throws an error if an invalid %xx URLencoded character is provided. This means that any folder with a %xx substring on it is likely to make it fail.

Steps to reproduce on FILEman:

  1. Go to backend and create a %dabug directory.
  2. Refresh the whole browser page.
  3. Delete the folder.
  4. Create the same folder.

You should get a Uncaught URIError: URI malformed error and the submit box doesn't get closed.

Re-factor copy/move JS

The copy/move UI should work without assuming that a tree instance is set in the app.

Thumbnails handling

Re-factor the way we handle thumbnails so that these get stored in the filesystem and not in the DB.

Normalize path names

There are certain characters that can be encoded in multiple ways in UTF-8. This is particularly a problem when you read the file name from filesystem and write to database.

Add a normalizer for common accented characters

Handle image EXIF orientation

If pictures are taken by rotating the camera, devices such as an iPhone will store the orientation in the EXIF metadata. If we don't consider the rotation when generating a thumbnail, the picture will be shown incorrectly.

Imagine comes with an autorotate that can automatically correct the image's orientation.

Related issue:

Background:

Example images:

Create mimetypes table

Docman uses a docman_mimetypes table to gather an extension<->mimetype map. This is highly useful when serving downloads and can be made generic in com:files.

Todo

  • Move database table structure from install.sql of DOCman and table data from mimetypes.sql into install.sql of com_files
  • Move mimetypes model into com_files
  • Add another adapter to query this table ComFilesMixinMimetype and add it to the default adapter list in _initialize

Route thumbnails

Route thumbnails links through application instead of direct linking.

Investigate performance impact with this change.

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.