Skip to content

Commit

Permalink
Fixed bug preventing GalyleoSearch from rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
rickmcgeer committed Apr 3, 2024
1 parent decdee1 commit c38eee8
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 5 deletions.
1 change: 1 addition & 0 deletions galyleo-data/galyleo-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,7 @@ class GalyleoView {
const actualFilter = this._getFilter_(filterSpecs, table);

const rows = await table.getFilteredRows(actualFilter);

// const rowsToSend = rows.map(row => getSelectedColumns(row));
const rowsToSend = rows.map(row => reorderRow(row));
return rowsToSend;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"lively": {
"projectDependencies": [],
"boundLivelyVersion": "6a89749513b773c0e01c023d221cc8a9cab7e931",
"boundLivelyVersion": "9d55f9b9e7e282b564515e6a5d978680b13bb375",
"canUsePages": true
}
}
11 changes: 11 additions & 0 deletions sample_config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* Configuration files for this installation. This file should be copied to config.js and
* The values for the server where user dashboards are stored and the secret required to be
* passed to that server put in
*/
'format esm';
/* The dashboard server information */
export const dashboardStoreServer = {
url: 'https://publication-server-htztskumkq-uw.a.run.app/',
secret: 'My secret';
};
21 changes: 20 additions & 1 deletion studio/dashboard-common.cp.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,21 @@ class DashboardCommon extends ViewModel {
fields.forEach(field => morph[field.name] = this._getFieldValue(descriptor, field));
}

/**
* Restore from a JSON string OR (equivalently) a JavaScript object.
* Just checks to see if the argument is a string; if it is, parses the string
* into an object and restores from that. Otherwise, just restores from
* the object.
* @param { string or object} storedForm
*/
async restoreFromSavedForm (storedForm) {
if (typeof storedForm === 'string') {
await this.restoreFromJSONForm(storedForm);
} else if (typeof storedForm === 'object') {
await this._restoreFromSaved(storedForm);
}
}

/**
* Restore from JSON form. This involves parsing the JSON string and
* restoring the tables, views, filters, and charts from the saved description
Expand Down Expand Up @@ -1414,7 +1429,11 @@ class DashboardCommon extends ViewModel {
async drawChart (chartName) {
const chart = this.charts[chartName];
if (!chart) return;
if (!this.gViz) return;
while (!this.gViz) {
await this._loadGoogleChartPackages();
console.log('Loading Google Chart Packages...');
}
console.log(`Finished loading, this.gViz = ${this.gViz}`);
this._makeTitle(chart);
const wrapper = await this._makeWrapper(chart, chartName);
if (wrapper) {
Expand Down
6 changes: 3 additions & 3 deletions studio/inputs/search.cp.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { InputLineDefault } from 'lively.components/inputs.cp.js';
import { component } from 'lively.morphic/components/core.js';
import { ShadowObject } from 'lively.morphic';
import { ShadowObject, part } from 'lively.morphic';
import { pt, Color } from 'lively.graphics';
import { galyleoFont } from '../shared.cp.js';

// GalyleoSearch.openInWorld()
// part(GalyleoSearch).openInWorld()
const GalyleoSearch = component(InputLineDefault, {
name: 'galyleo search',
borderRadius: 50,
dropShadow: new ShadowObject({ rotation: 90, color: Color.rgba(102, 102, 102, 0.65), blur: 8 }),
extent: pt(318.1, 28.8),
fontFamily: galyleoFont,
fontSize: 15,
renderOnGPU: true,
/* renderOnGPU: true, */
submorphs: [{
name: 'placeholder',
extent: pt(59, 28.8),
Expand Down

0 comments on commit c38eee8

Please sign in to comment.