DMPRoadmap / roadmap

DCC/UC3 collaboration for a data management planning tool
MIT License
102 stars 109 forks source link

Org branding/banner must include up to 3 links #729

Closed stephaniesimms closed 6 years ago

stephaniesimms commented 6 years ago

Related issue #726

Org admins can provide up to 3 links on the Org details page. The branding/banner design needs to accommodate these links.

vyruss commented 6 years ago

I'll add relevant code to make these links functional:

stephaniesimms commented 6 years ago

Note that these links should open in a new tab. Currently they open in the same window/tab.

sjDCC commented 6 years ago

Will these links have icons like in the DMPTool? e.g. icons

I think it would be good to include this. The contact email could have the chat bubbles and any standard links the computer icon. Without them it may not be obvious that these are links as it just shows as text roadmap-stage

vyruss commented 6 years ago

Temporarily blocked by #866

stephaniesimms commented 6 years ago

created issue #904 to report double redirect bug. please delete it if unnecessary/covered by #866

sjDCC commented 6 years ago

Tested this for Edinburgh and it looks fine

banner

I did generate the following error when adding the links though. It's seems there's a fairly restrictive character count so it wouldn't allow my entry of "Research Data Services" for the second link error

Ideally we would increase the length allowed to c.40 characters and better noticing is needed. Please add a tooltip to state the character count and an error message that explains why save is disallowed instead of ActiveRecord warning.

briri commented 6 years ago

ah yes, we discovered this restriction a few weeks ago. Its related specifically to MySQL and would likely be something that our collaborators would encounter. @bhavi, you were looking into removing the 255 char restriction on our VARCHAR table columns before the holiday break. Did you find a solution that we can run on roadmap-stg?

sjDCC commented 6 years ago

Thanks @briri It seems to be even shorter than than on this page - c.20 characters - so probably a setting we've applied rather than a MySQL thing.

Interestingly I was testing the funder links page too and the same input form fields there allow for much longer link text. Ideally the two would match, unless banner space restrictions mean we need to limit this one.

briri commented 6 years ago

Interesting that you're getting it after 20 characters. I just added a bunch myself and am not having any issues until I end up exceeding the 255 limitation (all the links and their text are stored together in a single column as {"org":[{"link":"http://google.com","text":"Google"},{"link":"http://test.org","text":"Test"}]}). screen shot 2018-01-03 at 8 51 06 am

Older versions of MySQL had a very limited size for the VARCHAR field. The current versions of that database allow for much larger values (on par with Postgres now) but since the original databases we're starting from were on older versions the limitations remain in place. Anyone migrating from dmponline_v3 (and using MySQL) would likely run into the same situation so we'll record the fix for this in the migration documentation on the wiki.

sjDCC commented 6 years ago

Great, thanks @briri

"Research Data Services" was disallowed so I guess it must be somewhere in the region of 20 characters.

vyruss commented 6 years ago

@sjDCC it doesn't have to do with the length of the text - it's just that there's a 255 character limit for old MySQL versions for the entirety of the "links" data (including URLs) - that can be solved by changing the column type from VARCHAR to TEXT I believe.

stephaniesimms commented 6 years ago

i don't see any links displayed in the banner now for any orgs (screenshots below for UoE). @sjDCC can you verify?

No links displayed in banner screen shot 2018-01-22 at 8 34 05 am

I should see these links screen shot 2018-01-22 at 8 36 39 am

sjDCC commented 6 years ago

Hmm you're right @stephaniesimms that's weird. Have added this to the agenda for today

stephaniesimms commented 6 years ago

the links are back! closing issue.

sjDCC commented 6 years ago

Looking good. Removing from board.