Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New module ConsultDoc #13

Merged
merged 32 commits into from
Jul 9, 2018
Merged

New module ConsultDoc #13

merged 32 commits into from
Jul 9, 2018

Conversation

sophiaab
Copy link
Contributor

Functionnality research, browser OK
Billboard : work in progress

@jailln
Copy link
Contributor

jailln commented Jun 28, 2018

Some GUI related comments first:

  • Document Browser:

    • Make it possible to display the browser pane just by checking its check box in the main menu and without having to run a research (to make it possible for users to just navigate through the documents without knowing which documents are stored in the database)
    • When a search is issued in the Research pane:
      • Open Document Browser (if not already) with the search results
      • Add a message in the Document Browser such as Documents have been updated according to research criteria
      • Add a button next to the previous message allowing to reset the research (and thus to navigate in all documents of the database from the Document Browser)
    • Add a close button similarly to the other modules
    • Harmonize the visual appearance of this view (it currently changes when navigating through documents)
    • Add numbers allowing to know how many navigable documents there are and which one we are looking at (e.g. 1/4, 2/4, etc.)
  • Research:

    • Please rename 'Referring date start' to 'Start referring date' (same for end date and publication dates)
    • Add a close button similarly to the other modules

A few other things:

  • What is the purpose of DemoController.html (in comparaison to Demo.html for instance ?) ? Do we need to have another Demo ?
  • Remove billboard related code and GUI elements if not working yet and postpone it to a new pull request (or make it completely work in this PR, depending on the work that still needs to be done on this matter)
  • Remove unused code related to the old (previous to this PR) organization for Documents handling

I will look deeper in the code after these modifications are ok :)

@sophiaab
Copy link
Contributor Author

sophiaab commented Jun 28, 2018

About commit 32a66af :
Document Browser:
Close button added
Visual appearance harmonized
Added numbers allowing to know how many navigable documents there are and which one we are looking at (e.g. 1/4, 2/4, etc.)

Research:
Renamed dates
Remove billboard related code and GUI elements

@sophiaab
Copy link
Contributor Author

sophiaab commented Jul 2, 2018

  • About commits e3d3406 to 5d856f945
    don't pay attention

  • About commit 26d7ea7 :

    • Possible to display the browser pane just by checking its check box in the main menu and without having to run a research
    • When a search is issued in the Research pane:
      Open Document Browser (if not already) with the search results
    • Add close buttons to research window and browser window


var extendedDocumentModel = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this information should be stored in a config file (possibly shared by server side software components ?). Is this planned for another pull request ?

Copy link
Contributor Author

@sophiaab sophiaab Jul 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Information is now stored in examples since it runs for a demonstration. I am not sure it should be shared by server side software components.

documentController = datDotGUI.add( documents, 'docBrowserWindowIsActive'
).name( "Documents" ).listen();
documentController.onFinishChange( function(value) { documents.toggleDocBrowserWindow(); });
var billboardOption = documentFolder.add( controller.documentBillboard, 'windowIsActive').name("Billboard(soon)").listen();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this button for the time being as billboard representation of documents has been postponed to a new pull request.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

';

var optionsFilter = "http://rict.liris.cnrs.fr/optionsFilter.json";
var schema = "http://rict.liris.cnrs.fr/schemaType.json";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The number of configuration files is growing up, I think that it could be a good idea to list them (along with their roles) and to provide examples in a dedicated page pointed in the README.md.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Readme.md is in UDV-Core/src/Modules/ConsultDoc

@@ -22,6 +22,10 @@ module.exports = {
plugins: [
definePlugin,
new webpack.optimize.CommonsChunkPlugin({ name: 'udvcore' }),
new webpack.ProvidePlugin({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment saying that this is related to alpaca

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -62,4 +66,9 @@ module.exports = {
devServer: {
publicPath: '/dist/',
},
resolve: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment saying that this is related to alpaca.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@jailln
Copy link
Contributor

jailln commented Jul 3, 2018

General remark:

This is a first step towards a MVC architecture as the code from the views, the controller and the model are separated in different files for the ConsultDoc module.

However the next step to reach a MVC architecture would be that the views and the model don't know about the controller (which is currently not the case). A way to manage this would be by using events triggered by the views and the model and trapped by the controller. The step after that would be to generalize this approach to the other modules (e.g. temporal) and between modules.

This work is postponed to other pull requests and I will merge this one when the remaining asked modifications are done :)

@jailln
Copy link
Contributor

jailln commented Jul 5, 2018

Two remarks:

  • If I run a research with Subject:subject 1, the 3 documents are still displayed in the Document Browser when they shoudn't be because from what I can see in the browser they don't have a subject defined. Or maybe they do and then it must be displayed in the Document Browser.
  • Could you limit / harmonize the size of the pictures of documents in the browser ?

Copy link
Contributor

@EricBoix EricBoix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work ! We are almost there for this PR.

@@ -13,6 +13,7 @@
<script src="../node_modules/moment/moment.js"></script>
<script src="../node_modules/three/build/three.js"></script>
<script src="../src/Externals/dat.gui/dat.gui.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependency on Jquery is already expressed (with this PR) in package.json.
The import of Jquery thus doesn't need to depend on on an external server (ajax.googleapis.com) to be active.
Use the "classic" import mechanism to remove that URL (and the dependency towards an active external server as well as the need for IP connectivity).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created issue #15

@@ -125,9 +125,42 @@ var help = new udvcore.HelpWindow({active:true});
// FIXME For the time being this demo uses the Vilo3D data. Provide a
// default document for the demo of DocumentHandler class and place it
// within src/Modules/Documents...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this comment that was associated with the following documents variable (and the Vilo3D/docs.csv data file).
Instead provide a new comment introducing the DocumentController. In particular explain why the DocumentModel, the researchModel (and OptionsResearch) appear at this level (why place it here and not "inisde" the DocumentController). This will take a couple lines of explanation...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

docResearch.onFinishChange(function(value){
controller.documentResearch.refresh();
});
/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the following commented out code (that will come in an upcoming different PR).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,82 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to regroup DocumentModel.json, optionsFilter.json, and schemaFilters.json within an examples/Document (or Contribute?) sub-directory to indicate they work together ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the general demo (with all options / functionnalities), the files are in UDV-Core/examples/data
For the demo regarding consultDoc module, they are in: UDV-Core/src/Modules/ConsultDoc/examples

documentController.onFinishChange( function(value) { documents.toggleDocBrowserWindow(); });
//Document uses a folder
var documentFolder = datDotGUI.addFolder("Documents");
var docResearch = documentFolder.add( controller.documentResearch, 'windowIsActive').name("Research").listen();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Respect the (implicit) coding style and the 80 lines wide constraint.
Manually break (newlines) the lines to make the code more readable !

@@ -0,0 +1,273 @@

import * as THREE from 'three';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same remark as for Demo.js concerning the lines longer than 80 columns.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, many lines still look much longer than 80 columns to me. Am I wrong ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

{

this.url = "http://rict.liris.cnrs.fr/APIVilo3D/APIExtendedDocument/web/"; //url of the server handling documents
//FIXME: to put in a configuration file of the general application
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just created issue #14 to get this fixed in the next PR.
Issues are much more "sticky" (better reminders) than FIXMEs hidden in the code.

@VCityTeam VCityTeam deleted a comment from sophiaab Jul 9, 2018
@jailln
Copy link
Contributor

jailln commented Jul 9, 2018

Good job; we did it! :)

@jailln jailln merged commit 64c5d15 into VCityTeam:master Jul 9, 2018
@jailln jailln mentioned this pull request Jul 9, 2018
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants