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

removing flyout services #5921

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions extensions/wikibase/module/scripts/wikibase-suggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@
return li;
},

flyout_request: function() {
// disable flyout requests, not used for Wikibase
},

request: function(val, cursor) {
var self = this,
o = this.options;
Expand Down
3 changes: 1 addition & 2 deletions main/tests/cypress/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ import 'cypress-wait-until';
// entity: {
// service_url: 'http://localhost:8000',
// service_path: '/suggest',
// flyout_service_url: 'http://localhost:8000',
// flyout_sercice_path: '/flyout',
//
// },
// },
// url: 'http://localhost:8000/reconcile',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class PreferenceStoreTests {
public static String json = "{"
+ "\"entries\":{"
+ " \"reconciliation.standardServices\":["
+ " {\"propose_properties\":{\"service_url\":\"https://tools.wmflabs.org/openrefine-wikidata\",\"service_path\":\"/en/propose_properties\"},\"preview\":{\"width\":320,\"url\":\"https://tools.wmflabs.org/openrefine-wikidata/en/preview?id={{id}}\",\"height\":90},\"view\":{\"url\":\"https://www.wikidata.org/wiki/{{id}}\"},\"ui\":{\"handler\":\"ReconStandardServicePanel\"},\"identifierSpace\":\"http://www.wikidata.org/entity/\",\"name\":\"Wikidata Reconciliation for OpenRefine (en)\",\"suggest\":{\"property\":{\"flyout_service_path\":\"/en/flyout/property?id=${id}\",\"service_url\":\"https://tools.wmflabs.org/openrefine-wikidata\",\"service_path\":\"/en/suggest/property\"},\"type\":{\"flyout_service_path\":\"/en/flyout/type?id=${id}\",\"service_url\":\"https://tools.wmflabs.org/openrefine-wikidata\",\"service_path\":\"/en/suggest/type\"},\"entity\":{\"flyout_service_path\":\"/en/flyout/entity?id=${id}\",\"service_url\":\"https://tools.wmflabs.org/openrefine-wikidata\",\"service_path\":\"/en/suggest/entity\"}},\"defaultTypes\":[{\"name\":\"entity\",\"id\":\"Q35120\"}],\"url\":\"https://tools.wmflabs.org/openrefine-wikidata/en/api\",\"schemaSpace\":\"http://www.wikidata.org/prop/direct/\"}"

+ " ],"
+ " \"scripting.starred-expressions\":{\"class\":\"com.google.refine.preference.TopList\",\"top\":2147483647,\"list\":[]},"
+ " \"scripting.expressions\":{\"class\":\"com.google.refine.preference.TopList\",\"top\":100,\"list\":[]}"
Expand All @@ -56,7 +56,7 @@ public void serializePreferenceStore() throws JsonParseException, JsonMappingExc
String jsonAfter = "{"
+ "\"entries\":{"
+ " \"reconciliation.standardServices\":["
+ " {\"propose_properties\":{\"service_url\":\"https://tools.wmflabs.org/openrefine-wikidata\",\"service_path\":\"/en/propose_properties\"},\"preview\":{\"width\":320,\"url\":\"https://tools.wmflabs.org/openrefine-wikidata/en/preview?id={{id}}\",\"height\":90},\"view\":{\"url\":\"https://www.wikidata.org/wiki/{{id}}\"},\"ui\":{\"handler\":\"ReconStandardServicePanel\"},\"identifierSpace\":\"http://www.wikidata.org/entity/\",\"name\":\"Wikidata Reconciliation for OpenRefine (en)\",\"suggest\":{\"property\":{\"flyout_service_path\":\"/en/flyout/property?id=${id}\",\"service_url\":\"https://tools.wmflabs.org/openrefine-wikidata\",\"service_path\":\"/en/suggest/property\"},\"type\":{\"flyout_service_path\":\"/en/flyout/type?id=${id}\",\"service_url\":\"https://tools.wmflabs.org/openrefine-wikidata\",\"service_path\":\"/en/suggest/type\"},\"entity\":{\"flyout_service_path\":\"/en/flyout/entity?id=${id}\",\"service_url\":\"https://tools.wmflabs.org/openrefine-wikidata\",\"service_path\":\"/en/suggest/entity\"}},\"defaultTypes\":[{\"name\":\"entity\",\"id\":\"Q35120\"}],\"url\":\"https://tools.wmflabs.org/openrefine-wikidata/en/api\",\"schemaSpace\":\"http://www.wikidata.org/prop/direct/\"}"

+ " ],"
+ " \"scripting.starred-expressions\":{\"class\":\"com.google.refine.preference.TopList\",\"top\":2147483647,\"list\":[]},"
+ " \"scripting.expressions\":{\"class\":\"com.google.refine.preference.TopList\",\"top\":100,\"list\":[]},"
Expand Down
157 changes: 46 additions & 111 deletions main/webapp/modules/core/externals/suggest/css/suggest-4_3.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Author: Kai Conragan (kai@metaweb.com)
.fbs-subpane : Inner container for result list <div>
.fbs-list : Contained by .fbs-subpane, this is the actual results list <ul>
.fbs-item : Individual item in results list <li>
.fbs-flyout-pane : Outermost container for flyout on specific object <div>


=======================================================
*/
Expand Down Expand Up @@ -68,11 +68,9 @@ below rules into your own stylesheet to customize.
*/

.fbs-pane,
.fbs-flyout-pane,
li.fbs-nomatch,
a.fbs-more-link,
li.fbs-selected,
.fbs-flyout-images,
#fbs-topic-image {
background: #fff;
}
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Here you are removing not just flyout styling, but also the styling on a lot of other elements: .fbs-pane, for instance, should likely stay. See the syntax for CSS selectors: there is a difference between .fbs-pane .fbs-flyout-pane (which could be removed entirely) and .fbs-pane, .fbs-flyout-pane (which should be simplified to just .fbs-pane).

Expand All @@ -83,39 +81,34 @@ li.fbs-selected,
}

.fbs-pane,
.fbs-flyout-pane,
.fbs-flyout-subtitle,
.fbs-topic-properties strong {
color: #666;
}
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Similar problem here (and in the rest of your CSS changes).


h3.fbs-topic-properties,
.fbs-flyout-pane p {
h3.fbs-topic-properties {
color: #444;
}

.fbs-item-name,
li.fbs-help-on-focus,
li.fbs-nomatch,
.fbs-nomatch-text,
.fbs-flyout-pane h3,

.fbs-properties-header {
color: #333;
}

.fbs-pane,
.fbs-flyout-pane {
.fbs-pane
{
border: 1px solid #bbb;
padding: 2px;
}

.fbs-flyout-pane {
border-color: #ccc;
}


.fbs-list,
.fbs-list-icons,
.fbs-flyout-content,

.fbs-attribution,
.fbs-header {
background-color: #f5f5f5;
Expand All @@ -132,9 +125,7 @@ li.fbs-nomatch {
border: 1px solid #f5f5f5;
}

h1#fbs-flyout-title {
color: #f60;
}


li.fbs-selected .fbs-item-name {
border-color: #f60;
Expand All @@ -153,9 +144,7 @@ li.fbs-selected .fbs-item-name {
}


#fbs-flyout-title .fbs-flyout-label {
color: #aaa;
}


.fbs-citation {
white-space: nowrap;
Expand All @@ -164,13 +153,12 @@ li.fbs-selected .fbs-item-name {
}

/* topic image */
#fbs-topic-image,
.fbs-flyout-images {
#fbs-topic-image
{
border: 1px solid #a9a9a9;
}

.fbs-suggestnew-button,
.fbs-flyout-pane {
.fbs-suggestnew-button {
border: 1px solid #9a9a9a;
color: #999999;
}
Expand All @@ -180,7 +168,7 @@ li.fbs-selected .fbs-item-name {
}

ul.fbs-list,
.fbs-flyout-content,

.fbs-attribution,
.fbs-header {
border: 1px solid #dae3e9;
Expand Down Expand Up @@ -208,23 +196,21 @@ Freebase Suggest Typography
3. Setting global style rules
*/

.fbs-pane,
.fbs-flyout-pane {
.fbs-pane{
font-size: 16px;
font-family: Helvetica Neue, Arial, Helvetica, sans-serif;
}

ul.fbs-list,
.fbs-flyout-content,

.fbs-attribution,
div.fbs-header {
font-size: 62.5%;
}


/* insure <strong> displays bold */
.fbs-pane strong,
.fbs-flyout-pane strong {
.fbs-pane strong{
font-weight: bold;
}

Expand All @@ -234,16 +220,16 @@ Freebase Suggest Structure
-------------------------------------------------------
*/

.fbs-flyout-content,

.fbs-attribution {
margin: 2px;
}

.fbs-flyout-content { margin-bottom: 0; }

.fbs-attribution { margin-top: 0; }

.fbs-pane { width: 325px; } /* results list container */
.fbs-flyout-pane { width: 319px; margin-left: 3px; } /* flyout container, 3px narrower on each side to create drawer appearance */


ul.fbs-list {
max-height: 400px;
Expand All @@ -253,18 +239,12 @@ ul.fbs-list {
border-top: 0;
}

.fbs-flyout-content,

.fbs-attribution {
padding: 5px;
}

.fbs-flyout-content:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}



/*
Expand Down Expand Up @@ -436,34 +416,20 @@ Freebase Suggest Create New
font-style: italic;
}

/*
-------------------------------------------------------
Freebase Suggest Flyout Elements
-------------------------------------------------------
*/

.fbs-flyout-id {
color: #999 !important;
}

/* the object title */
h1#fbs-flyout-title {
font-size: 1.2em;
font-weight: bold;
margin-bottom: 0.5em;
margin-top: 0.3em;
}

h1#fbs-flyout-title .fbs-flyout-template-label {
color: #999999;
font-size: 0.8em;
}


/* denotes topic, type, view, base, etc. */
#fbs-flyout-title .fbs-flyout-label {
font-weight: normal;
}










/* Image for single topic result */
#fbs-topic-image {
Expand All @@ -474,27 +440,13 @@ h1#fbs-flyout-title .fbs-flyout-template-label {
}

/* Image pair for views/base/etc. */
.fbs-flyout-images {
float: left;
margin: 0 10px 0 0;
padding: 1px 0 1px 1px;
}

.fbs-flyout-images img {
float: left;
margin-right: 1px;
}

.fbs-flyout-subtitle {
font-size: 1.1em;
margin-bottom: 0.5em;
}

.fbs-flyout-pane h3 {
font-size: 1em;
line-height: 1.4;
margin-bottom: 0.25em;
}





.fbs-properties-header {
font-size: 1em;
Expand All @@ -512,34 +464,21 @@ h3.fbs-topic-properties {
font-size: 0.8em;
}

.fbs-flyout-pane p {
font-size: 1.2em;
line-height: 1.4;
max-height: 10em;
overflow: auto;
}

/* this class is applied with fbs-topic-flyout when a thumbnail is present
in order to provide a fixed margin on text to prevent poor text wrapping
around thumbnail
*/
p.fbs-flyout-image-true,
h3.fbs-flyout-image-true,
h1.fbs-flyout-image-true { margin-left: 85px; }







.fbs-meta-info { margin-left: 110px; }
#fbs-user-flyout li {
margin-left: 100px;
}
#fbs-domain-flyout .fbs-meta-info { margin-left: 145px;}

/* generic flyout list */
.fbs-flyout-list li {
font-size: 1em;
margin-left: 15px;
}

#fbs-domain-flyout #fbs-flyout-title { margin-bottom: 0.5em; }





/*
-------------------------------------------------------
Expand All @@ -555,11 +494,7 @@ Freebase Suggest Attribution
min-height: 15px;
}

.fbs-flyout-types {
font-style: italic;
line-height: 1;
font-size: 1.2em;
}


/*
-------------------------------------------------------
Expand All @@ -579,5 +514,5 @@ to inline Internet Explor fixes

* html .fbs-item-name{ width: 100%; }

* html .fbs-flyout-content:after { height: 1px; }


Loading