Giter Club home page Giter Club logo

uwestfest's People

Contributors

bjarnef avatar jeavon avatar kgiszewski avatar snerpton avatar tomfulton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

uwestfest's Issues

NuGet install not overwriting package.manifest?

I ran install-package UrlPicker on a site that had 0.9.2 installed manually.

I was prompted to overrite some files, but for some reason it didn't seem to overwrite the package.manifest:

2014-05-16_14-02-21

ClientDependency issue

Code once minified and used with ClientDependency, breaks URL picker.

image

Root cause is there is some code that doesn't declare var and it appears ClientDependency is strict. I will remove the offending code as it is not actually used anywhere.

Upgrading from 0.14 r to 0.15+ causes data corruption

Data saved in 0.14 or before is like this:

{
  "type": "content",
  "meta": {
    "title": "",
    "newWindow": false
  },
  "typeData": {
    "url": "",
    "contentId": 1395,
    "mediaId": null
  }
}

0.15 and beyond expects:

[
{
  "type": "content",
  "meta": {
    "title": "",
    "newWindow": false
  },
  "typeData": {
    "url": "",
    "contentId": 1395,
    "mediaId": null
  }
}
]

This causes the Umbraco UI to go very wrong...

Possibility to pick an anchor from Umbraco content

It would be nice if the user could pick not only content, but also an anchor in this content. I've got a quick solution with a text input for the anchor if the user wants to insert it. Will create a pull request.

Compatibility with ModelsBuilder gone

Everything was working fine with ModelsBuilder, but now something changed with multiple urls and the PropertyValueConverter broke.
ModelsBuilder generates the following:

[ImplementPropertyType("link")]
public UrlPicker.Umbraco.Models.UrlPicker Link
{
    get { return this.GetPropertyValue<UrlPicker.Umbraco.Models.UrlPicker>("link"); }
}

This should be:

this.GetPropertyValue<List<UrlPicker.Umbraco.Models.UrlPicker>>("link")

because of the change.

Cannot read property 'mediaId' of undefined

When I enable 'Media preview' and haven't selected anything yet, I get a JS error:
Cannot read property 'mediaId' of undefined

This is with version 0.14.1 via NuGet and Umbraco 7.3.7.

UrlPicker returns null when media selected

When media has been selected a null object is returned. URL and content fine.

All worked fine with:

  • Umbraco: 7.2.1
  • UrlPicker: 0.12.0

Following upgrade to:

  • Umbraco: 7.2.8
  • UrlPicker: 0.14.0

Url and Content fine, but media selection always returns null.

Reverting to UrlPicker v0.12.0 seemed to fix the problem. Upgrade to UrlPicker v 0.13.0 introduced the issue, so I guess there is a breaking change in that release?

Issue first reported at: https://our.umbraco.org/projects/backoffice-extensions/urlpicker/issues/71426-urlpicker-failing-for-selecting-media

Property editor not setting $dirty when choosing content/media

Umbraco use the $dirty (ng-dirty) property on the form in property editors to check if they should display the "warning message" for unsaved content.

2015-05-14_18-20-57
2015-05-14_18-22-12
2015-05-14_18-23-24

This is set for the url (unless when you enter some spaces). However when you choose content/media it doesn't set the $dirty property on the form.

Sometimes you might need to set the property manually using $setDirty() .. I have done it this way inspired by some of the core property editors: bjarnef/Switcher@cc26ca9

Default URL Type

Might be nice to allow admins to select a default type in the PreValues. I think in most cases I'd like to have Content as the default to encourage editors to use that over a URL.

How do you call the newWindow property?

I might have missed something but I cannot seem to get the newWindow property to work.

How should I call it in something like:

@foreach (var call in action) {
     var link = call.GetValue<UrlPicker.Umbraco.Models.UrlPicker>("urlPicker");
     if(link != null && !string.IsNullOrWhiteSpace(link.Name)) {
     <a href="@link.Url" class="btn" target="???" title="@link.Name">@link.Name</a>
}

I have tried @link.Target and @link.NewWindow and after a quick look through the source I cannot see what it could be any assistance would be very welcome thanks.

Rename of repo?

Firstly, great package. We've used it on a few projects and it matches the style of the original uComponents url picker nicely.

Appreciate that this was mainly intended for uWestFest as the repo name suggests, but since then it has become the source for UrlPicker which has been released as package and gained some use. Perhaps a rename of the repo would now be a good idea?

Thanks!

Update Umbraco.Core dependency to v7.2.x or v7.3.x

There is already some confusion as while the .net is built against v7.1.5 I believe the dictionary keys require v7.2.8.

I would recommend we update to have dependency of v7.3.8, anyone have a different view?

Property Converter Performance Issue

The use of the data type service in the updated property converter adds a small but noticable delay in resolving any properties. Locally we're seeing a 60-80ms delay on using it. We've used the URL Picker for a navigation builder for this particular site and when you output 15+ URLs into the navigation this builds into a significant time. Is there a way to detect the requested type from within the property converter as this would likely be much quicker?

Or would a static cache of property to type that could be created at boot up be a better approach?

I don't mind doing the leg work but would appreciate input on best approach.

URL property doesn't respect URLs in the same content tree on a node that doesn't have the domain specified

I have an Umbraco install that serves 3 domains with the following site structure:

DOMAIN-1.COM + Page_D1-1 + Page_D1-1.1 
             |
             + Page_D1-2 + DOMAIN-2.COM + Page_D2-1
             |           |              |
             |           |              + Page_D2-2
             |           |
             |           + DOMAIN-3.COM + Page_D3-1
             |                          |
             |                          + Page_D3-2                   
             |
             + Page_D1-3
             |
             + Page_D1-4                    

DOMAIN-2.COM and DOMAIN-3.COM have their hostnames set on the Umbraco node, whilst DOMAIN-1.COM doesn't.

I have a UrlPicker data-type sat on Page_D3-1 with 'Content' links to Page_D1-1, Page_D2-1 and Page_D3-2. Inspection of the UrlPicker.Umbraco.Models.Url property for these links reveals the following information:

Page_D1-1.Url = /Page_D1-1/
Page_D2-1.Url = http://DOMAIN-2.COM/Page_D2-1.Url/
Page_D3-2.Url = http://DOMAIN-3.COM/Page_D3-2.Url/

Links Page_D2-1.Url and Page_D3-2.Url work as expected, but because Page_D1-1.Url is a relative URL its target from Page_D3-1 is http://DOMAIN-3.COM/Page_D1-1/ and not http://DOMAIN-1.COM/Page_D1-1/ I might expect. The page http://DOMAIN-3.COM/Page_D1-1/ does not exist, so visitors get a 404 error when visiting this page.

This errent behaviour is similar to if I had used IPublishedContent.Url from this page instead of IPublishedContent.UrlAbsolute().

The addition of an UrlAbsolute() method on the UrlPicker.Umbraco.Models.UrlPicker class that respects the change of domain when climbing the content tree would be great.

Cheers,
Chris

Umbraco 7.2.4
UrlPicker (NuGet) 0.12.0

Non-mandatory URL Pickers generate a lot of errors when failing to deserialise

Steps to reproduce:

  • Create new URL Picker data type with default settings
  • Attach data type to document type
  • Create content
  • View content on site
  • Errors are logged to log4net

Expected Results:

No errors are logged.

Actual Results:

Deserialisation errors are logged.

Cause:

When the data is saved it has the value:

[
  {
    "type": null,
    "meta": {
      "title": "",
      "newWindow": false
    },
    "typeData": {
      "url": "",
      "contentId": null,
      "mediaId": null
    },
    "disabled": false
  }
]

This is because the data type is only allowing a single value and doesn't start with an add button, so one record exists in the array. Because of this record it attempts to deserialise into the model but throws an exception within Newtonsoft because the type can't be deserialised as it is not a nullable field.

Workaround:

Enable the start with add button will prevent this one, broken, record data being created.

Need commit rights

@xorcery Can you add me to this repo as well? I have a pull request that I've reviewed but I can't push to the repo.

Thanks.

Control does not honor "Mandatory" setting

Unfortunately, this control does not honor Umbarco's "Mandatory" setting for properties. This causes grief for the developer who uses the control, because I have to perform a "check" to ensure that I get Umbraco to render a URL without a YSOD due to having an empty TypeData.Url, or .ContentId, or .MediaId.

Picker value not always saved

I am seeing this intermittently...the worst kind of bug.
Changes to the value of the UrlPicker are not always saved. I can set the value initially to any of the three types and Save/Publishing successfully. But if I try to make an edit, the original value persists...sometimes. I'm getting inconsistent test results. Maybe it doesn't matter whether I'm adding or editing. I've tested 100 times and I still can't draw a clear conclusion so wanted to pass it along.

Use consistent media dialog as in Umbraco core

The media dialog should be consistent with the Umbraco core media dialog - here it is missing the upload button.
Furthermore you can't use drag and drop of file to the dialog panel like with media picker.

Umbraco media picker:
umbraco-media-dialog

Url Picker - media:
urlpicker-media-dialog

I think in this line https://github.com/imulus/uWestFest/blob/develop/urlpicker/app/scripts/controllers/url.picker.controller.js#L22 it is fine to use treepicker when selecting content (or as default) .. or maybe content or linkpicker? http://umbraco.github.io/Belle/#/api/umbraco.services.dialogService

But when choosing "Media" it should use mediaPicker.

I think treePicker only render tree nodes and with the search filter.. but for media it would be much nicer with the previews for media items.. and it also make it possible to use the onlyImages parameter :)

At the same time maybe fix issue #18

UrlPicker class conflicts with the namespace

If I want to use the class UrlPicker inside my own code, I get the following error:
CS0118 'UrlPicker' is a namespace but is used like a type
This is obvious, but really annoying. Renaming the class would be a breaking change, but how about adding a IUrlPicker interface for the model, so we can use the interface without a problem?

Media restrictions for users not respected.

If a user only has access to a restricted section of the media tree, should the dialog treepicker not only show that? In the case of no other manual config restrictions anyway.

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.