silverstripe / silverstripe-admin Goto Github PK
View Code? Open in Web Editor NEWSilverstripe Admin Component
License: BSD 3-Clause "New" or "Revised" License
Silverstripe Admin Component
License: BSD 3-Clause "New" or "Revised" License
The HTMLEditorFieldToolbarTest
class won't run on windows file systems. This is caused by a mkdir
command that (I believe) creates a file with a path that is too long.
Hi, I found a possible bug that I think relates to silverstripe/silverstripe-cms#586 in the CMS codebase but, instead of Page
instances, it's for generic DataObject
's managed by ModelAdmin
. This seems to affect the 3
codebase, not sure about master
.
Basically, I cannot prevent validation when I delete a ModelAdmin
administered DataObject
instance (e.g. in my case Location
object driven by LocationAdmin
) even if I were to manually call this on my form either in ModelAdmin
(modifying core code) or in my LocationAdmin
class' own ->getEditForm()
override:
$form->setValidationExemptActions(array('delete', 'doDelete'));
Even though the ->validate()
method is called on submission, it doesn't work. This is because instead of calling validate on CMSForm
when submitting (the instance that is returned by ModelAdmin
when editing, like when you edit a Page
) which would normally check for a validation exempt action, it instead manufactures a completely separate Form
instance from here: https://github.com/silverstripe/silverstripe-framework/blob/3/control/RequestHandler.php#L200 (I gave up after this point).
How can I prevent form validation on my DataObject
's? Is this a bug?
The link titles for insert link functionality in TinyMCE are inconsistent with the designs provided.
See designs here: https://projects.invisionapp.com/share/BGAYOTRFY#/screens/224873109
Link titles in provided design:
Current link titles (should match designs):
The shade of grey used as the TinyMCE toolbar background isn't used anywhere else in the CMS, and so the WYSIWYG toolbar doesn't look as integrated as it should.
How about changing it to the same colour as the CMS header bars? (#F0F2F4)
Yes, it's a subtle change, but I think it makes a big difference.
When there is an empty list item in the breadcrumb the page title (last breadcrumb item) gets pushed down.
Adding a quick CSS fix for this but keeping in mind for the refactor of Pages breadcrumbs (will open separate issue).
<TreeDropdownField>
component, ideally with minimal code duplicationLooking for feedback on these (WIP) https://projects.invisionapp.com/boards/D3X68PS46K28/
I wanted to add some custom javascript and css to the admin, I took a look at the LeftAndMain class I fond this in the doc block of $extra_requirements_javascript
YAML configuration example:
<code>
LeftAndMain:
extra_requirements_javascript:
mysite/javascript/myscript.js:
</code>
When I tried the following in an new config.yml
LeftAndMain:
extra_requirements_javascript:
mysite/modules/editor/code/javascript/no-follow.js:
extra_requirements_css:
mysite/modules/editor/code/css/no-follow.css:
It does not load the javascript file, it only loads the css file, but when I do the following, it works, is there a possible issue? or just outdated documentation?
LeftAndMain:
extra_requirements_css:
- mysite/modules/editor/code/css/no-follow.css
extra_requirements_javascript:
- mysite/modules/editor/code/javascript/no-follow.js
At the moment we use <FormControl.Static />
in react which doesn't produce proper input tags. I suggest that we should probably stick with literal inputs for all input-type fields, and flag these with either disabled
or readonly
html properties.
This distinguishes readonly inputs from literals (provided by LiteralField).
In SSv4 we must have about four different structures of the north toolbar across different modeladmins, Pages, Files area, Campaigns. I think a decent refactor to clean things up might save time in the long run as it is heavily used in a lot of different formats.
Issues found (morning of 1 May)
Related to silverstripe/silverstripe-framework#6140
(Using SilverStripe 3.5.x-dev on CWP)
If I export a list of the members to a CSV file:
It generates this CSV file:
Notice how there is a space in the First Name column. If I import the CSV file as is, any new members will be created but they will be missing their first name in the Member object.
So two issues here:
At the moment change detection is attaching itself to all forms, not simply those that submit to a dataobject. E.g. search forms, insert-link forms. These incorrectly prompt the user to save the form before they navigate away, creating a highly negative user experience.
Traced back to a change in BootRoutes.js which checks all redux forms.
https://github.com/silverstripe/silverstripe-admin/pull/76/files#r118858608
The framework is evidently pointing developers towards omitting the lead-slash, however ModelAdmin::$managed_models
requires a lead-slash and throws an error
[User Error] ModelAdmin::init(): Invalid Model class
private static $managed_models = [
'Zanderwar\Scraplands\Models\Player',
'Zanderwar\Scraplands\Models\Online'
];
This works fine if I do include the lead-slash
We've removed the reliance of buttons on jQuery UI (see silverstripe/silverstripe-framework#6354 and follow up PRs). This also meant renaming button classes from .ss-ui-button
to .btn
. There's still 54 matches of the old .ss-ui-button
classes around SCSS/JS/SS/PHP files in core though - we need to clean this out
Requires #100 to be done first
Part of Reponsive CMS issue silverstripe/silverstripe-framework#6267
Remove constrained viewport of 720px by swapping <meta name="viewport" content="width=720, maximum-scale=1.0" />
for <meta name="viewport" content="width=device-width, maximum-scale=1.0" />
[~1pt]
Pull requests
Asset bulk actions should/could include options:
Move
Delete
Add to campaign
Unpublish
Publish
Archive
Download
See designs https://projects.invisionapp.com/boards/2JX68PNPDF6K/
When using a TreeMultiselectField with nested items, after saving the field and reopening the dropdown, some items previously selected are not selected anymore.
To reproduce:
What happens:
The second parent leaf is opened and its child selected. The first parent leaf is not opened (even though the icon to open it is active). If you open the first parent (you have to click twice, once to close and once to reopen the leaf) you can see the child is not selected anymore. The dropdown summary now doesn't have both children displaying there.
What I expect to happen:
I expect all children selected to remain checked after reopening the dropdown. It's not a matter if the parents are all opened or not if the children are selected, the main problem is that previous selections get deleted when reopening the dropwdown.
When one edits a Member by first selecting a Group and then one of its Members, there is the Member_Validator
(as defined in the injector) used (see Group#getCMSFields()). None of the possible MemberExtensions that implement updateValidator
(see Member#getValidator()) are considered. Therefore the validation when editing a Member is inconsistent.
See:
We are currently on tinymce 4.3.11. I suggest we update to at least 4.5.7, preferable 4.6.1
Sometimes when you make a change in the CMS and click Save... nothing happens. The Save button gets focus, but you need to click it again to see the spinning progress indicator animation and trigger the actual save. This bug has tripped me up countless times, because I assume I've saved but I haven't.
I encounter this bug often, but I can't seem to come up with conditions to reliably reproduce it. I've seen it on 3.1 through 3.3 and assume it happens in 3.0 too. I've seen it affect page forms as well as DO edit forms (such as editing a Member in the security section).
Have other people observed this bug or is it just me?
Having to disable the overflow hidden on the CMS html, to view the rendered error, annoys me a bit. It would be nice that if there's an error detected, the overflow hidden isn't set.
I understand that this is not easy to detect/implement, so it's a very big NTH.
I've noticed a few times whilst clicking around ss4 that there's sometimes a flicker whilst it loads the component or data. This happens with the campaign form when you click 'Add campaign', the breadcrumbs and most notable the files area starts by saying 'No items found' before loading the items.
I think anything that relies on retrieving data should have a hasloaded
state set to false so that it can be relayed to the user that the page/component isn't ready yet.
The demo is way out of date and should be available for the community to provide feedback. This could also be used as a testing ground without the risk of major breaking changes which are common in test sites.
https://www.silverstripe.org/4/
On one of my sites we have the FormTemplateHelper_Pre32 enabled for forms, this seems to break the HtmlEditorField insert link feature, when selecting the link type the form options aren't updated.
This looks to be down to https://github.com/silverstripe/silverstripe-framework/blob/3.6/javascript/HtmlEditorField.js#L582-L597 where it's searching for elements with an ID ending with _holder
When I disable the FormTemplateHelper_Pre32 extension, the insert link dialog works as expected.
See silverstripe/silverstripe-framework#4938 (2.2.1).
In order to enforce standard proptypes, all top level keys should be in a lib that is imported and extended by all FormField components in react.
field-specific keys should be declared as custom data-subkeys; Some solution is necessary to enforce this (perhaps docs, or perhaps enforced in react as a part of the above lib).
Requires #100 to be done first.
Part of the Responsive CMS set of issues silverstripe/silverstripe-framework#6267
ModelAdmin toolbar actions to fallback to just icons for smaller screens see
Follow up task from silverstripe/silverstripe-framework#6740
In order to interact with Redux Form data, you need to use Selectors. These require a FormName
argument. We register our forms with name = schema url. This URL is record specific. Which makes it impossible to hook into forms unless you know the current record identifier used for this form - which makes for tight coupling of form behaviour to components managing their state.
Note: This is a similar issue to the dependency injection service names, e.g. admin/assets/EditForm/schema/99
schema url vs. 'TextField.AssetAdmin.EditForm` service name. We could reuse these service "namespaces"?
We are getting false-positives for HtmlEditorFields which have extraneous
characters in their Content, which gets mangled by TinyMCE and turns into blank spaces. This results in the popup "Are you sure you want to leave these unsaved changes?" dialog from appearing even though no changes has been made.
This could prove to impact false-negatives, as users are known to use
to pad/indent the text on their page. This would mean that if users were only padding/indenting their text without other "meaningful" changes, the popup "Are you sure..." dialog will not appear if the user attempts to browse away, and they will lose their changes without warning.
We'll need to investigate how much of an edge case this could be
Requires #100 to be done first.
Part of the Responsive CMS set of issues silverstripe/silverstripe-framework#6267
< 768px Drop the top right set of UI tabs to sit beneath the breadcrumbs/header toolbar in order for them to fit the given space (left aligned). [~2pt]
If a user is linked to a page id that doesn't exist they receive a mostly blank CMS page thanks to LeftAndMain returning the default empty form.
This is a rather confusing experience for users and there should likely be a 404 alert or similar to let the user know that there's no page where they are looking.
Follow up from the "insert link" work, see #58 (comment)
HTTP requests are a major factor in loading performance, even if they're small file sizes. We need to reduce them as much as possible, and the recent TinyMCE changes have gone in the opposite direction - adding four new ones. Figure out how to allow TinyMCE plugins to be loaded determininistically in our app boot, rather than relying on script inclusion order.
/cc @flamerohr
Requires #100 to be done first
Part of Responsive CMS issue silverstripe/silverstripe-framework#6267
More options dropdown to swap out the text "More options" for "..." icon in pages section.
Entwine/PJAX forms have been traditionally server-side validated only. React forms are currently working the same way, but could be much more responsive to invalid user input.
Validator.js
)Validator.js
is inconsistent. Example: <input type=number>
should validate decimals based on step. At the moment it's using isNumeric from the validator NPM package which doesn't allow decimals.date
rule in Validator.js
seems to be wrong, since there's no isDate()
in the validator
libThe drag-drop functionality of files is intuitive for single images but when it comes to dragging multiple items it isn't as intuitive.
Currently you need to check multiple items to drag them, it would be good to be able to select multiple items by dragging an invisible box around items to select them and to be able to use keyboard keys which are native to PC or Mac (eg. shift key and command key for Mac)
Hi guys,
Wouldn't be better to show the "Failed Login Account" number as read only and a reset button somewhere instead of leaving it as an editable number ? I also think that not many people knows for what that field is (reset).
Regards,
Filis.
Breadcrumbs in SecurityAdmin get duplicates after saving a group.
Steps to replicate:
Breadcrumbs are now broken:
Expected: "Security / Groups / My Group"
Actual: "Security / Groups / My Group / My Group"
If you click "My Group" link in the breadcrumbs you're taken back to the root of SecurityAdmin, but instead of just showing "Security" in the breadcrumbs, it shows as "Security / My Group".
Affects SilverStripe 3.1.x-dev, all browsers.
Files title should be left (has been pushed because of menu action for mobile devices).
Search icon should be placed next to the close panel action.
Sort should have an active and hover state for both smaller screens and larger as per the other actions in the toolbar. I've updated the icon in the SilverStripe icon set so that it will change to
with the next update to icons so that the dropdown arrow and icon arrow don't conflict (this should happen automatically).
<TreeDropdownField>
react componentreact-select
for the new react-based TreeDropdownFieldButtons (of button toolbar) should align with the button area rather than the icon within the button. Just so it is consistent with the rest of the CMS.
I would like to see all buttons on the button toolbar aligned consistently so that I feel I'm using a finished product that is stable and robust.
Buttons with no background (.btn-secondary) should align by the icon rather than the surrounding button area, applies left side of toolbar and right side.
Related:
Drop area on the "Up folder" icon can be improved as it is covered when an image is dragged on top of it.
The above pull requests fix:
Navigating using the forward and back browser buttons is inconsistent.
Steps to reproduce:
admin/pages
Expected:
URL changes back to admin/pages
and the pages section loads
Actual:
URL changes back to admin/pages
but the section doesn't load.
Third party modules often add additional context to the CMS, often requiring these to be stored in session. E.g.
It may be wiser to add a standard "context" registration in LeftAndMain that these modules can access. These context arguments would be added to all links via querystring get parameters, along with a fixed config whitelist.
See #19 (comment)
If you register an additional authenticator by implementing get_cms_login_form
and supports_cms
on your Authenticator
class, the tab styling to select an authenticator in the dialog is broken when you get the popup after your session times out.
This needs to support the tabs correctly by resizing the dialog to fit the form. The form styling alignments inside the tab needs to be fixed as well, e.g. "Forgot password?" is no longer inline with the password field.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.