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

Create extension point to connect the touring panel/Refactor LineupSidePanel #285

Merged
merged 71 commits into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
ef8dc2d
Draft linup panel tab extension point
oltionchampari Dec 16, 2019
b627a5e
Lineup panel refactoring
oltionchampari Dec 16, 2019
971d9d1
Further LineUpPanel refactoring
oltionchampari Dec 16, 2019
6e2e1c6
further refactoring
oltionchampari Dec 16, 2019
4c36b2e
Fix open/close add column dialog
oltionchampari Dec 16, 2019
4909ec3
Refactor ranking button and tab container
oltionchampari Dec 16, 2019
930758f
adapted panel buttons styles
oltionchampari Dec 17, 2019
630e099
further refactoring
oltionchampari Dec 17, 2019
ced6924
restructeded files
oltionchampari Dec 17, 2019
e7ee711
minor improvements
oltionchampari Dec 17, 2019
1e332fe
imporve styles
oltionchampari Dec 17, 2019
f34ecda
improving styles
oltionchampari Dec 19, 2019
cdf4e6b
Merge branch 'develop' into ochampari/10_tourdino-lineup-panel-button
oltionchampari Dec 19, 2019
7798f77
minor changes
oltionchampari Dec 19, 2019
5576283
fixed tab toggling feature
oltionchampari Dec 19, 2019
f2a66b9
extracted util function
oltionchampari Dec 20, 2019
c8d321b
addapted styles for top mode
oltionchampari Dec 20, 2019
4c122e9
add hooks to panel tab when panel tab closes
oltionchampari Jan 7, 2020
d8daee9
Merge branch 'develop' into ochampari/10_tourdino-lineup-panel-button
oltionchampari Jan 9, 2020
62fe47a
Remove SearchBoxProvider constructor + parameter
thinkh Feb 7, 2020
f6aec93
Add documentation to SearchBoxProvider
thinkh Feb 7, 2020
9bc87b1
Add documentation to PanelButton
thinkh Feb 7, 2020
0105a34
Add documentation to PanelHeader
thinkh Feb 7, 2020
e570f18
Rename variable in PanelRankingButton
thinkh Feb 7, 2020
f4b29cb
Merge branch 'develop' into ochampari/10_tourdino-lineup-panel-button
thinkh Feb 7, 2020
b6397e8
Revert some i18n strings in LineUpPanelActions
thinkh Feb 7, 2020
fec77c5
* Improve typings and docu
oltionchampari Feb 17, 2020
de33309
Refactor PanelNavButton & extend docu
oltionchampari Feb 17, 2020
56e4b70
extend lineupSidepanel documentation
oltionchampari Feb 17, 2020
0ddb1eb
fix linter error
oltionchampari Feb 18, 2020
1b8ded2
refactor PanelTab.ts
oltionchampari Feb 19, 2020
08f0c7f
adapt css for side panel top mode
oltionchampari Feb 19, 2020
52c1b16
minor change
oltionchampari Feb 19, 2020
82f2556
Commented code
oltionchampari Feb 19, 2020
f577360
Commented code
oltionchampari Feb 19, 2020
6ed5c77
refactor and and comment code
oltionchampari Feb 19, 2020
65eedd9
refactor & comment code
oltionchampari Feb 19, 2020
f46f630
commneted code
oltionchampari Feb 19, 2020
e7b4103
fix bug
oltionchampari Feb 19, 2020
537b5d0
* Restructured the LineUpPanelActions components
oltionchampari Feb 28, 2020
e14210a
added order property to PanelNavButton
oltionchampari Feb 28, 2020
cb5467f
Merge branch 'ochampari/10_tourdino-lineup-panel-button' of github.co…
oltionchampari Feb 28, 2020
ee0be72
Refactor tab, nav, and shortcut button
thinkh Mar 2, 2020
adedddd
hide unnecesary line using css
oltionchampari Mar 3, 2020
4c3bed8
Improved documentation
oltionchampari Mar 3, 2020
41332d9
Add spaces before comments
oltionchampari Mar 3, 2020
e85d3a5
Rename PanelDownloadButtonContainer
oltionchampari Mar 3, 2020
75c309e
Imporve commnets
oltionchampari Mar 3, 2020
6d42673
Fix markup for PanelNavButton
oltionchampari Mar 3, 2020
ad3540e
Add default configuration to PanelTab
oltionchampari Mar 3, 2020
17d83f7
Minor fix
oltionchampari Mar 3, 2020
17afe91
Fix linter error
oltionchampari Mar 3, 2020
1a91a8a
Improve comments
oltionchampari Mar 3, 2020
520a206
Sort plugins to be appended in the correct order
oltionchampari Mar 3, 2020
838ddf9
Formatting
oltionchampari Mar 3, 2020
779b4eb
Replace mixin() with Object.assign()
thinkh Mar 4, 2020
931fa5f
Merge branch 'ochampari/10_tourdino-lineup-panel-button' of github.co…
oltionchampari Mar 5, 2020
1a409a8
Merge remote-tracking branch 'origin/develop' into ochampari/10_tourd…
thinkh Mar 5, 2020
c5aab92
refactor insertAdjacentHTML()
oltionchampari Mar 12, 2020
4d7ddaa
Fix IPanelTabExtension inteface
oltionchampari Mar 12, 2020
4cc0ab8
Merge remote-tracking branch 'origin/develop' into ochampari/10_tourd…
thinkh Mar 13, 2020
0e06bb5
Add typings for `ctx` variable
thinkh Mar 13, 2020
a501100
Use `this.parent` instead of `document.body`
thinkh Mar 13, 2020
7609faa
Remove unused variable
thinkh Mar 13, 2020
e8a6ae3
Initialize search box options with empty object
thinkh Mar 13, 2020
0141585
Add NullTabContainer + refactor PanelTabContainer
thinkh Mar 13, 2020
e5d204e
Refactor PanelTab EP
thinkh Mar 13, 2020
8a2d8ad
Merge pull request #319 from datavisyn/thinkh/refactor-paneltab-exten…
oltionchampari Mar 13, 2020
8621dc1
Increase LineUp panel width slightly
thinkh Mar 13, 2020
7e17290
Extract language string
thinkh Mar 13, 2020
1f3d7ac
Fix side panel scrolling
thinkh Mar 13, 2020
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
1 change: 1 addition & 0 deletions src/assets/locales/en/tdp.json
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@
},

"LineupPanelActions": {
"rankingPanelTabTitle": "Ranking Configuration",
"searchPlaceholder": "Add Column …",
"addColumnButton": "Add Column",
"collapseButton": "(Un)Collapse",
Expand Down
55 changes: 52 additions & 3 deletions src/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import {IEventHandler} from 'phovea_core/src/event';
import {IAdditionalColumnDesc} from './lineup';
import {RangeLike} from 'phovea_core/src/range';
import {IDType} from 'phovea_core/src/idtype';
import {IColumnDesc, Column} from 'lineupjs';
import {IColumnDesc, Column, LocalDataProvider} from 'lineupjs';
import {EViewMode} from './views/interfaces';
import {AppHeader} from 'phovea_ui/src/header';
import {PanelTab} from './lineup/internal/panel/PanelTab';

export * from './tour/extensions';

Expand All @@ -23,6 +24,12 @@ export const EXTENSION_POINT_TDP_APP_EXTENSION = 'tdpAppExtension';
export const EXTENSION_POINT_TDP_LIST_FILTERS = 'tdpListFilters';
export const EXTENSION_POINT_TDP_VIEW_GROUPS = 'tdpViewGroups';

/**
* Register a new tab to the LineupSidePanel.
* Consists of a button/header to open the tab content and the tab content itself
*/
export const EP_TDP_CORE_LINEUP_PANEL_TAB = 'epTdpCoreLineupPanelTab';

/**
* Register new form elements for the form builder. Form elements must implement the `IFormElement`.
*
Expand Down Expand Up @@ -136,6 +143,48 @@ export interface IScoreColumnPatcherExtensionDesc extends IPluginDesc {
load(): Promise<IPlugin & IScoreColumnPatcherExtension>;
}

export interface IPanelTabExtension {
desc: IPanelTabExtensionDesc;

/**
* Create and attach a new LineUp side panel
* @param tab PanelTab instance to attach the HTMLElement and listen to events
* @param provider The data of the current ranking
* @param desc The phovea extension point description
*/
factory(desc: IPanelTabExtensionDesc, tab: PanelTab, provider: LocalDataProvider): void;
}

export interface IPanelTabExtensionDesc extends IPluginDesc {
/**
* CSS class for the PanelNavButton of the PanelTab
*/
cssClass: string;

/**
* Title attribute PanelNavButton
*/
title: string;

/**
* Customize the PanelNavButtons' position (recommended to use multiples of 10)
*/
order: number;

/**
* Width of the PanelTab
*/
width: string;

/**
* If true a shortcut button is appended to the SidePanel header in collapsed mode
* @default false
*/
shortcut?: boolean;

load(): Promise<IPlugin & IPanelTabExtension>;
}

export interface IRankingButtonExtension {
desc: IRankingButtonExtensionDesc;
factory(desc: IRankingButtonExtensionDesc, idType: IDType, extraArgs: object): Promise<IScoreParam>;
Expand Down Expand Up @@ -302,7 +351,7 @@ export interface IViewPluginDesc extends IPluginDesc {
/**
* optional security check to show only certain views
*/
security?: string|((user: IUser)=>boolean);
security?: string|((user: IUser) => boolean);

/**
* a lot of topics/tags describing this view
Expand All @@ -312,7 +361,7 @@ export interface IViewPluginDesc extends IPluginDesc {
/**
* a link to an external help page
*/
helpUrl?: string | { url: string, linkText: string, title: string };
helpUrl?: string | {url: string, linkText: string, title: string};
/**
* as an alternative an help text shown as pop up
*/
Expand Down
Loading