Git Product home page Git Product logo

lib-admin-ui's Introduction

Admin UI Library for Enonic XP

Actions Status License Codacy Badge

UI framework, that provides Enonic applications with core components and styles.

Usage

Place the following dependency in your build.gradle file:

dependencies {
    include 'com.enonic.lib:lib-admin-ui:1.2.0'
}

Building

Default

Run the following command to build with default options:

./gradlew build

Environment

The project will be built in production environment by default. But you can also set it explicitly by passing the env parameter with environment type:

./gradlew build -Penv=dev

There are only two options that are available now:

  • prod
  • dev

Both environments are almost identical, except that building in the development environment will result in creating the DTS files, sourcemaps and other things, critical for the debugging. The build itself may also be a bit slower sometimes.

Quick

Sometimes, you may want to build your project faster. To do so, just skip the linting (lint task) and testing (test task):

./gradlew build -x lint -x test

NPM upgrade

In case you want forcefully update all your node dependencies, use:

./gradlew npmInstallForce

Take a note, that you can also use aliases in Gradle, and nIF would be just enough to run npmInstallForce.

Dependencies

Some code and configs are shared across the application. They are moved to the separate repository and published as npm packages.

Common .less styles and mixins can be also found under enonic-admin-artifacts.

lib-admin-ui's People

Contributors

alansemenov avatar anatol-sialitski avatar ashklianko avatar bellfalasch avatar blask0 avatar comlock avatar dependabot-preview[bot] avatar dependabot[bot] avatar edloidas avatar glennricaud avatar jsi avatar michalklimekplativo avatar pmi avatar poi33 avatar pull-merger[bot] avatar pvmerlo avatar reisfmb avatar rymsha avatar vbradnitski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

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

lib-admin-ui's Issues

Long text in Selection Panel Toggler overlaps the checkbox

@alansemenov commented on Mon Sep 18 2017

SelectionPanelToggler control is a button containing a span (a circle with selected items count) with ::after pseudo-element (localized text "elements"). Since text is inside a pseudo-element, its width is unknown, and the button container has incorrect width.

Change the control so that text is inside p element inside of ::after. The button container should use display: flex to place its child elements side by side. This way the container will correctly calculate its width based on width of its child elements.

image


@sigdestad commented on Mon Sep 18 2017

Shouldn't we just drop the text alltogether? I think it is redundant..


@alansemenov commented on Mon Sep 18 2017

I believe we had it without the text and then we decided that it wasn't obvious what the number stands for. Dropping it is always a possibility of course. Maybe it should say "selected" instead of "elements"?

Remove unused image files in lib-admin-ui

There are tons of images in /assets/admin/common/images that don't seem to be used but affect size of the lib that is now used by other apps, so it affects size of their distros as well.

Find out which images are not used, remove them and try to replace the rest with icomoon font icons.

Fix post load in grid after sequential hide & show event

@sgauruseu commented on Thu Sep 14 2017

Issue 1. Incorrect notification message, when any UserItem has been deleted
Issue2 Endless Spinner
Issue2 reproducing when add 20-30 new roles and try to expand the Role folders, endless spinner appears

  1. open Users and add two new roles, close the browser tab
  2. click on the Users link and open Users again
  3. click on Roles and add new role
    5.click on the expander and try to expand Roles folder
    BUG: edless spinner is present
    roles

Toggle off tree-mode when search is triggered

If selector is currently in tree mode and user initiates search by typing into the field, we should toggle OFF the tree icon since the list will be in flat mode.
When the filter is cleared, we should toggle state of the tree icon based on initial config of the selector. So, if the selector was originally in the tree mode via config.treeMode=true then resetting the filter should switch the selector back to tree mode.

Customize CKEditor's toolbar

@alansemenov commented on Mon Jun 19 2017

Customize the default configuration of the toolbar so that we have the same set of tools as we do now. Implement support for custom configuration via HTML Area schema.

http://docs.ckeditor.com/#!/guide/dev_toolbar


@alansemenov commented on Wed Aug 09 2017

Also, don't forget that toolbar should only become visible when the HTML Area gets focused.


@ashklianko commented on Wed Aug 09 2017

Sure


@alansemenov commented on Thu Aug 17 2017

@ashklianko
There were a few small things to fix, see if you can do this in one of the next PRs:

  • The footer of the area is now always visible (also in TinyMCE), we should hide it when the area is not active
  • Remove the "Code" (it doesn't work because <code> tag must be placed inside a container element, btw) and "Create Div container" buttons
  • Move "Block quote" inside the group of buttons to the left
  • Remove 20px margin inside the HTML Area's body element

HtmlArea impossible to open InsertLink modal dialog

@sgauruseu commented on Mon Sep 25 2017

  1. open a htmlArea content
  2. click on the InsertLink

Cannot read property 'create' of undefined
at LinkModalDialog.createContentSelector (LinkModalDialog.ts:282)
at LinkModalDialog.createContentPanel (LinkModalDialog.ts:161)
at LinkModalDialog.createDockedPanel (LinkModalDialog.ts:232)
at LinkModalDialog.layout (LinkModalDialog.ts:143)
at LinkModalDialog.ModalDialog [as constructor] (ModalDialog.ts:80)
at new LinkModalDialog (LinkModalDialog.ts:35)
at Function.HTMLAreaDialogHandler.openLinkDialog (HTMLAreaDialogHandler.ts:49)
at Function.HTMLAreaDialogHandler.createAndOpenDialog (HTMLAreaDialogHandler.ts:18)
at createDialogHandler (HtmlArea.ts:193)
at HTMLAreaBuilder.ts:81
area

Fix placeholder text in Tree Content selector

When content selector expands in tree mode, the placeholder text says "No matching items" before the content tree is loaded. This is wrong - it should say "Searching...", like for the flat mode.

Refactor BrowseItem class

BrowseItem elements are still used, even after the BrowseItemPanel was heavily modified and the initial purpose (grid of elements on multiple selections) was replaced with a simple preview.

  • Remove them and optimize the apps rendering cycle.
  • Simplify the data update on selection change in BrowsePanel.

Implement toggle of list mode in ContentComboBox

Add left-aligned tree icon to the control (see #20). Make it toggle the list between flat and tree modes.

Add a new property to ContentComboBox builder class to specify the default mode. If nothing is specified, the default mode should be flat.

Add a new property to ContentComboBox builder class to hide the "tree" icon. If nothing is specified, the icon should be visible.

Turn on default tree mode for ContentMoveComboBox and hide the toggle icon.

Add toggle tree icon to content selector

Replace theinput-icon on the left side of the selector which is not doing anything with the tree icon that will toggle tree mode on and off.

Replace
image
with
image

The icon's toggle state must be based on whether the selector is currently in tree mode or not.
If selector's config has treeMode=true, then the icon should be by default toggled ON.

Tooltips (must be localized):
When the icon is "ON": Switch to flat mode
When "OFF": Switch to tree mode

Missing images after cleanup

@sgauruseu commented on Fri Sep 22 2017

  1. Click on app in the Application grid
    apps

  2. XP Tour
    image

  3. (Copied from enonic/xp-apps#56) When "Insert Image" dialog opens from the HTML Area, there are errors in browser console. They were there even before the cleanup of images, but I don't see how these images are used in the dialog at all. Find out what's causing the errors.
    image

Refactor FilterPanel usage in BrowsePanel

Currently FilterPanel is located in BrowsePanel but it is used only in 2 of 3 browse panel implementations, that brings extra code with nested 'if' checks for filter panel null or not null and actions performed on it,
Bring one more layer between BrowsePanel and it's implementations (say FilterableBrowsePanel) and put FilterPanel and behaviour related there.

Add wrapper flag to FormItemBuilder

When used in modal dialogs FormItem's inputs are wrapped with 'input-wrapper' element. See ModalDialog.createFormItem() method, but there are places where that method is unavailable, like IssueDialogForm for instance.

So we rather need to have a wrapper flag on the FormItemBuilder itself that will tell FormItem to wrap an input with 'input-wrapper' element.

Also revisit and update all usages.

Implement paging in Principal selector

@aro commented on Thu Oct 05 2017

When the system contains a large amount of users in a group, the edit group page loads slowly.
It looks like the slow part is adding the elements to the Dom, the request does not seem slow anymore.

Below, an example of code to create random users:

var authLib = require('/lib/xp/auth');
    for(var i=0; i < 1; i++) {
        var group = authLib.createGroup({
            userStore: 'system',
            name: 'group' + i,
            displayName: 'Group ' + i,
            description: "description"
        });

        for(var j=0; j < 2000; j++) {
            var username = 'user' + i + '-' + j;
            var user = authLib.createUser({
                userStore: 'system',
                name: username,
                displayName: 'User ' + i + '/' + j,
                email: 'user' + i + '-' + j + '@enonic.com'
            });

            authLib.addMembers('role:system.admin.login', ['user:system:' + username]);
            authLib.addMembers('role:system.admin', ['user:system:' + username]);
            authLib.addMembers('group:system:group' + i, ['user:system:' + username]);
        }
    }

TextLine with input values longer than max-length should not be sent to backend

@aro commented on Mon Sep 18 2017

If there are values in TextLine or TextArea input types, with the length of the text value longer than max-length config, the value should not be stored.

    <input name="textarea" type="TextArea">
      <label>Text Area</label>
      <occurrences minimum="0" maximum="1"/>
      <config>
        <max-length>3</max-length>
      </config>
    </input>

Currently if the user types a text longer than max-length and then click Save, the value is sent to the server in the update request, even though is marked as invalid. The server checks the validation and throws an exception.

It should work in the same way as TextLine with regexp config, or Long/Double with man/min config. The value should not be set internally if it is not valid according to the config. If the value typed is invalid it should be sent as empty when clicking on Save. This is what happens now for regexp, max, min config.

Jumpy centering of modal dialogs when browser window is being resized

@alansemenov commented on Mon Sep 18 2017

  1. Open the browser window to be about 800p or wider
  2. Open the Issue List dialog
  3. Start resizing the window by decreasing the width

When the window is about 675px wide the dialog starts behaving weirdly, jumping to the left side and then centering again. It also changes height.

The dialog should not change height and it should always remain centered (or take the entire width, on lower resolutions), like the "New content" dialog for example.

Process contents of the HTML Area when saving

@alansemenov commented on Mon Jun 19 2017

We do some manipulations with contents of HTML Area when saving and loading, specifically to make sure that image urls are correctly rendered in both admin and preview/live modes (by manipulating values in src and data-src attribute of the img tag). Make sure we implement the same logic with CKEditor.

Invalid layout inside the macro dialog when a tall image is loaded into the form

@alansemenov commented on Wed Sep 20 2017

  1. Unzip this into "macros" folder of an app and deploy:
    macros.zip

  2. In Content Studio open any content with HTML Area and open the "Insert Macro" dialog.

  3. Select "Macros Image" from the macro selector

  4. Select a tall image from the image selector

After the image is loaded, the dialog is resized but not centered, so bottom part of the dialog is not inside the viewport.

If you hover mouse over the image, the vertical scrollbar appears. It happens because of the toolbar that appears all the way down at the bottom of the dialog, so this should also be fixed so that the tooltip pops up next to the cursor.

Also, get rid of the top margin above the image.

image

Content selector is not using paging

When dropdown is expanded, all of the matching content items are fetched and there's no paging. We should always use paging, also in the tree mode (same as in the Content grid).

The UI for the about dialog looks bad in IE11

The Enonic Logo pushes out the content in the about dialog and it does not look nice. By removing the css height for the Enonic XP logo it looks normal. This is tested in windows 7, IE11 on crossbrowsertesting for 6.12.0-RC2. In Edge 15 the red XP logo does not show, but that looks ok.

.xp-about-dialog .xp-about-dialog-app-icon img {height: 135px}

screen shot 2017-10-09 at 13 32 20

screen shot 2017-10-09 at 13 37 32

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.