EEXCESS / chrome-extension

Chrome extension for displaying cultural and scientific resources in the context of a web page. The extension integrates other modules like C4, the Visualization Widgets and PEAS.
2 stars 2 forks source link

Integration of the user profile #36

Closed ThomasCerq closed 8 years ago

ThomasCerq commented 8 years ago

How/where can we integrate the user profile UI? The main page is located here: /html/user_profile.html

schloett commented 8 years ago

I'm currently working on the possibility to switch EEXCESS off/on. This will be realized via a popup, that opens when you click the EEXCESS icon in the menu bar (see attached screenshot). I would add a link/icon there, that opens the profile page in a new tab. However, I would be very thankful, if you could care about adding the relevant attributes (after the policy has been applied) to the profile. This should happen in background.js, whenever a query needs to be send (case: 'triggerQuery', there the query profile should be expanded with the attributes from the profile page).

It seems that some of the references are broken in user_profile.html (you can visit the page by using a link like in the screenshot, the extension ID might need to be adapted, you find it on chrome://extensions). Since you are using requirejs anyway, you could load the scripts via require in the same way as it is done in background.js: first require the path spec as defined in common.js and then require the necessary modules. The advantage hereof is that whenever an additional library is installed via bower (bower install --save), Grunt will automatically configure the paths in common.js. CSS-files will still need to be included manually, but at least it is one possible source of errors less. Using common.js in the same way as in background.js may collide with your common.js, but I guess you could rename the latter to basic.js or something similar.

Also we will have some settings, the user can change, for example the number of results to retrieve or the providers from which to retrieve resources. I am not sure whether we should have a dedicated page for that (could be something similar to the options page in Jarvis) or if we should merge it with the profile page. What do you think?

ThomasCerq commented 8 years ago

I will work on the integration of the UI today: fix the broken references, add the attributes to the profile, use requirejs, ... Regarding the other settings (number of results, etc.), I don't know what's best. On the one hand, I think it's good to have only 1 UI as it's easier for users to find where to change the settings. On the other hand, I think it's not that good to mix the concepts (user profile/privacy settings with application parameters). My opinion is not very helpful. Sorry about that. May be we should ask UX people what they think...

ThomasCerq commented 8 years ago

@schloett I think I made all the modifications (and pushed to the develop branch). Can you check if everything works before we close this issue? Cheers.

schloett commented 8 years ago

Looks good to me! Maybe you could add autocompletion to the interests, utilizing Stefan's Service? Because then, we would have the semantic of an interest. Tag-it is already prepared for autocompletion and you could use Stefan's service for suggestions. The tag-it dependency points to a fork, where some modifications have been added. This fork supports to add custom data beyond the textual label via .tagit('createTag', <label>, <data>) which are stored as properties in the data attribute of the tag. Also I would leave this issue open, until the link to the profile is included (waiting for a design proposal for the popup which includes the link).

ThomasCerq commented 8 years ago

I don't find any documentation on tagit('createTag', label, data)... Could you send me a link to some documentation?

schloett commented 8 years ago

Sry, there is no documentation :( I just adapted tag-it on the fly to my needs and wanted to keep the effort as low as possible, since I've seen some pull requests for attaching data to the tags and hence think that this feature will make it into tag-it anyway. I also noticed, that additional modifications are necessary to tag-it in order to integrate Stefan's service for autocompletion. Therefore, I suggest, that I'll try to integrate it and get back to you if questions arise (since I guess the effort for documenting the relevant parts is as high as implementing the autocompletion...;))

ThomasCerq commented 8 years ago

Nice, I hand it over to you then ;-)

The label of the suggested category picked by the user is considered but not the URI. I think, the management of interests is better now than it was yesterday, as users can select from an existing list. It will be even better when the URI will be considered, as it will be possible to use this information elsewhere.

schloett commented 8 years ago

Implemented it in the branch feature/autocompletion (you need to run bower update, as the latest version of tag-it is required), could you please check if it's ok for you and if yes, merge the branch back into 'develop'? Minor issue I discovered: When adding a new set of interests, the "Values shared with the system" of existing interest sets disappear (even though they are disclosed).

ThomasCerq commented 8 years ago

It works perfectly! I also fixed the minor issue you reported above.

schloett commented 8 years ago

Now the popup with the link is included in the dev branch. Hence the profile should be fully integrated and imho we could close the issue.

ThomasCerq commented 8 years ago

I really like what I'm seeing! Should we include the user profile in a pop-up (as the general settings) instead of opening a new tab?

schloett commented 8 years ago

The general settings are displayed via a special options page for chrome extensions. As far as I know, only one such a page can exist for the extension. Hence, including the profile as pop-up would require to inject it in the current page, which is quite some effort and will not work all the time (injecting the profile page into an SSL-secured page will fail). In addition it is not related to the current page at all. Therefore, I would leave it as is.

What could be nice would be to include the general privacy settings (low,med,high) to the settings/options page, together with a link to the profile page (opening in a new tab). I consider these settings as the most important, so they might be available to the user as "general settings" in the options page. If a user wants to adjust details, she can visit the profile page then.

ThomasCerq commented 8 years ago

Ok I undersand. Regarding the integration of the general privacy settings in the the settings/options page, I think your idea is good. Do we do it now or do we postpone it? If we postpone it, I think we can close this issue.

schloett commented 8 years ago

From my point of view, there is no urge to do it know. I consider it as an enhancement which can be integrated in the future, so I think it's best to close this issue and create a new one for the integration of the general privacy settings.

ThomasCerq commented 8 years ago

Makes sense.