Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.

File Actions (open/edit) for apps with custom file extension support - #356

Merged
DeepDiver1975 merged 3 commits into
masterfrom
unknown repository
Nov 27, 2018
Merged

DeepDiver1975 merged 3 commits into
masterfrom
unknown repository

Conversation

@tempelgogo

@tempelgogo tempelgogo commented Nov 27, 2018 •

Copy link
Copy Markdown
Contributor

Description

File type icons from owncloud/core integrated as webfont;
We will adjust webpack to build the iconfont itself from all svg‘s in static directory; But currently all webfonts are static builds from all available core filetype icons this night.
We could enable theming by simply loading a new iconpack; Sadly we would need some build tool magic to generate this font, which contravenes against our „simple DropIn Theming“ requirement.
The use of raw SVG‘s as icon‘s would complicate the icon handling, so we need to discuss this further.

From now on; Apps need to expose an appInfo object, containing:

  • static name
  • id, (i prefer to use the ‚convention over configuration’ paradigm & force apps to match index route with app name; This allows us to open every app with simply ‚/appId/‘)
  • app icon (which we can use later for navbar)
  • registered filetype extensions

The latter is able to override the icons shown in the ‚AppLauncher‘ per filetype

This PR also provides the new demo app ‚markdown-editor‘, which can read & write markdown files.

There are some edge cases with can possibly cause some bugs, but i‘m aware of most of them & on the way fixing them. Unfortunately this depends on some other code and therefore needs to follow later.

Related Issue

refs #149 provide FileAction API for open & share with custom filetype registration
refs #267 import oc/core filetype icons as webfont & set generic icon for all files

Motivation and Context

Allow Phoenix Apps to register custom open/edit action for specific filetypes

How Has This Been Tested?

  • enable markdown-editor app in your config.json
  • open file with md extension
  • notice the AppLauncher, which ask's you which app to open this file
  • select markdown-editor & edit the file
  • you should see a WYSIWYG markdown editor with your loaded file
  • you can also save this file to your ownCloud!
  • try override icon for md in markdown-editor code
  • joyful notice that it's already an oc/core filetype icon
  • open file with md extension & notice a changed icon in the AppLauncher
  • add new file extensions like markdown in markdown-editor code
  • create a test.markdown file at ownCloud backend & open in phoenix
  • AppLauncher should offer markdown-editor as valid app for this file extension

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • Code changes

Open tasks:

  • waiting for external dependencies

@tempelgogo tempelgogo self-assigned this Nov 27, 2018
Comment thread apps/demo/src/app.js
}];

const appInfo = {
name: 'Demo',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name is subject to translation ... we need to keep this in mind ....

@DeepDiver1975
DeepDiver1975 merged commit 578644e into owncloud:master Nov 27, 2018
@tempelgogo
tempelgogo deleted the feature/file-actions branch November 27, 2018 10:25
@tempelgogo tempelgogo mentioned this pull request Jan 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Category:Enhancement Add new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants