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

Fix v2 #343

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
cbb68e7
feat(framework): Updated version of UI framework
pavlovicnemanja Jun 1, 2023
540d22a
fix(publishing): Fixed issue with publishing page
pavlovicnemanja Jun 2, 2023
ac89edd
fix(subnav): Fixed issue with subnav
pavlovicnemanja Jun 13, 2023
461cf96
fix(radio): Fixed issue with radio group
pavlovicnemanja Jun 13, 2023
f27b827
feat(fb): Removed FBIA from publisher
pavlovicnemanja Jun 22, 2023
b878cdd
feat(seo): Changed seo value to envolvedFrom
pavlovicnemanja Jun 22, 2023
af8866d
feat(fba): Remove FBA from multiple places
pavlovicnemanja Jun 22, 2023
870aed6
feat(fba): Remove fba for one more space
pavlovicnemanja Jun 22, 2023
f01b52c
feat(seo): Changed saveMetadata url
pavlovicnemanja Jun 22, 2023
f445881
saveMetaData to guid
IvanJelicSF Jun 22, 2023
f94320d
Layout and Dark theme fixes
fritzSF Jul 4, 2023
91bd266
framework version bump
fritzSF Jul 4, 2023
9f210ec
Merge pull request #339 from fritzSF/develop
pavlovicnemanja Jul 5, 2023
b949425
fix(theme): Fixed dark theme
pavlovicnemanja Aug 1, 2023
f1fe2e3
Merge pull request #340 from pavlovicnemanja/develop
pavlovicnemanja Aug 1, 2023
654c5b3
fix(lists): Fixed content lists ordering
pavlovicnemanja Aug 5, 2023
a09fc4c
feat(UI): Applied UI Fixes
pavlovicnemanja Aug 5, 2023
c3a1779
feat(logo, spinner): Fixed issue with spinner and added dark logo
pavlovicnemanja Aug 5, 2023
4f28980
fix(package): Fixed issue with version of ui framework
pavlovicnemanja Aug 5, 2023
3b66fec
feat(ui-framework): Updated version of ui framework
pavlovicnemanja Aug 6, 2023
642621d
feat(dropdowns): Improvements on dropdown components
pavlovicnemanja Aug 14, 2023
7bc827f
fix(list): Fixed automatic/manual lists
pavlovicnemanja Aug 15, 2023
42edf51
fix(MultiSelect): Fixed metadata multiselect
pavlovicnemanja Aug 15, 2023
fa8182a
feat(list): Updated lists UI
pavlovicnemanja Aug 15, 2023
a0bb939
feat(spacing): Fixed spacing in filter panel
pavlovicnemanja Aug 15, 2023
3e303d8
fix(multiselect): Fixed issue with multiselect
pavlovicnemanja Sep 15, 2023
8ea4c0d
fix(automatic): Fixed filer panel on automatic lists
pavlovicnemanja Sep 15, 2023
9091b87
fix(dropdown): Fixed issue with background on dropdown
pavlovicnemanja Sep 22, 2023
32b01fe
feat(website): Added improved UI website
pavlovicnemanja Sep 22, 2023
04a83e6
fix(state): Removed unused state items
pavlovicnemanja Sep 22, 2023
12a05bf
Fix authoring react publisher fixes
thecalcc Oct 31, 2023
6dfab1d
Fix v2. Remove absolute elements
thecalcc Nov 1, 2023
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ src/
yarn.lock
build

.history/
.github
.vscode
.idea

.DS_Store

# VIM related files
*.swo
*.swp
Expand Down
4 changes: 2 additions & 2 deletions client/components/Analytics/Analytics.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from "prop-types";
import classNames from "classnames";
import _ from "lodash";

import { CheckButtonGroup, RadioButton } from "superdesk-ui-framework/react";
import { CheckButtonGroup, RadioButtonGroup } from "superdesk-ui-framework/react";

import SitesSideNav from "../generic/SitesSideNav";
import FiltersPanel from "./FiltersPanel";
Expand Down Expand Up @@ -254,7 +254,7 @@ class Analytics extends React.Component {
</button>
<div style={{ marginLeft: "1rem" }}>
<CheckButtonGroup>
<RadioButton
<RadioButtonGroup
value={this.state.activeView}
options={[
{ value: "listing", label: "Analytics" },
Expand Down
101 changes: 56 additions & 45 deletions client/components/Analytics/FiltersPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import React from "react";
import PropTypes from "prop-types";
import _ from "lodash";
import moment from "moment";
import { Button, IconButton } from "superdesk-ui-framework/react";
import MultiSelect from "../UI/MultiSelect";
import AsyncMultiSelect from "../UI/AsyncMultiSelect";
import { Button, IconButton, MultiSelect, TreeSelect } from "superdesk-ui-framework/react";
import { DatePicker } from "superdesk-ui-framework/react";

class FiltersPanel extends React.Component {
Expand Down Expand Up @@ -42,27 +40,31 @@ class FiltersPanel extends React.Component {
}
}

loadAuthors = (inputValue = null) => {
if (inputValue && inputValue.length < 3) return this.state.authors;
loadAuthors = (inputValue = null, callback = null) => {
if (inputValue && inputValue.length < 2) callback(this.state.authors);

return this.props.publisher
this.props.publisher
.queryAuthors({ term: inputValue, limit: 30 })
.then((response) => {
let authorsOptions = [];

response._embedded._items.forEach((item) => {
authorsOptions.push({
value: item.id,
label: item.name,
value: {
value: item.id,
label: item.name,
}
});
});

this.setState({ authors: authorsOptions });
return authorsOptions;
callback(authorsOptions);
})
.catch((err) => {
return this.state.authors;
callback(this.state.authors);
});

return () => { };
};

handleAuthorChange = (arr) => {
Expand Down Expand Up @@ -161,49 +163,58 @@ class FiltersPanel extends React.Component {

this.props.routes.map((route) => {
routesOptions.push({
value: route.id,
label: route.name,
value: {
value: route.id,
label: route.name,
},
label: route.name
});
});

return (
<div className="sd-filters-panel sd-filters-panel--border-right">
<div className="side-panel side-panel--transparent side-panel--shadow-right">
<div className="side-panel__header side-panel__header--border-b">
<span className="side-panel__close">
<IconButton
icon="close-small"
tooltip={{ text: "Close", flow: "left" }}
onClick={this.props.toggle}
/>
</span>
<h3 className="side-panel__heading side-panel__heading--big">
Filter
</h3>
<div className="side-panel__header side-panel__header--border-b side-panel__header--has-close">
<div className="side-panel__header-wrapper">
<div className="side-panel__header-inner">
<h3 className="side-panel__heading side-panel__heading--big">
Filter
</h3>
</div>
<div className="button-group button-group--end button-group--no-space side-panel__btn-group">
<IconButton
icon="close-small"
tooltip={{ text: "Close", flow: "left" }}
onClick={this.props.toggle}
/>
</div>
</div>
</div>
<div className="side-panel__content">
<div className="side-panel__content-block">
<div className="form__row">
<div className="sd-line-input sd-line-input--no-margin">
<label className="sd-line-input__label">Category</label>
<div className="sd-line-input sd-line-input--no-margin sd-padding-t--0">
<MultiSelect
onSelect={(values) => this.handleRouteChange(values)}
label="Category"
onChange={(values) => this.handleRouteChange(values)}
options={routesOptions}
selectedOptions={
this.state.filters.routes ? this.state.filters.routes : []
}
optionLabel={(option) => option.label}
value={this.state.filters.routes}
emptyFilterMessage="No routes found"
/>
</div>
</div>
<div className="form__row">
<div className="sd-line-input sd-line-input--no-margin">
<label className="sd-line-input__label">Authors</label>
<AsyncMultiSelect
onSelect={(values) => this.handleAuthorChange(values)}
loadOptions={(inputValue) => this.loadAuthors(inputValue)}
selectedOptions={
this.state.filters.author ? this.state.filters.author : []
}
<div className="sd-line-input sd-line-input--no-margin sd-padding-t--0">
<TreeSelect
label="Authors"
kind="asynchronous"
value={this.state.filters.author}
getLabel={(item) => item.label}
getId={(item) => item}
allowMultiple={true}
searchOptions={this.loadAuthors}
onChange={(values) => this.handleAuthorChange(values)}
/>
</div>
</div>
Expand Down Expand Up @@ -234,9 +245,9 @@ class FiltersPanel extends React.Component {
value={
this.state.filters.published_after
? moment(
this.state.filters.published_after,
"YYYY-MM-DD"
).toDate()
this.state.filters.published_after,
"YYYY-MM-DD"
).toDate()
: null
}
dateFormat="YYYY-MM-DD"
Expand All @@ -260,9 +271,9 @@ class FiltersPanel extends React.Component {
value={
this.state.filters.published_before
? moment(
this.state.filters.published_before,
"YYYY-MM-DD"
).toDate()
this.state.filters.published_before,
"YYYY-MM-DD"
).toDate()
: null
}
dateFormat="YYYY-MM-DD"
Expand All @@ -283,12 +294,12 @@ class FiltersPanel extends React.Component {
</div>
</div>
<div className="side-panel__footer side-panel__footer--button-box">
<div className="flex-grid flex-grid--boxed-small flex-grid--small-2">
<div className="button-group button-group--start button-group--compact">
<Button text="Clear" style="hollow" onClick={this.clear} />
<Button text="Run Report" type="primary" onClick={this.save} />
</div>
<div
className="flex-grid flex-grid--boxed-small flex-grid--small-1"
className="button-group button-group--end button-group--compact"
data-sd-tooltip={
this.shouldAllowReportGeneration()
? null
Expand Down
2 changes: 1 addition & 1 deletion client/components/Analytics/Reports/Reports.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Reports extends React.Component {
dataLength={this.state.reports.length}
next={this.loadReports}
hasMore={this.state.page < this.state.totalPages}
loader={<Loading dark={true} />}
loader={<Loading />}
scrollableTarget="scrollableDiv"
>
{this.state.reports.map((item, index) => (
Expand Down
4 changes: 2 additions & 2 deletions client/components/ContentLists/Automatic/Automatic.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class Automatic extends React.Component {
return (
<div className="flex-grid flex-grid--grow flex-grid--small-1">
<div className="flex-grid__item flex-grid__item--d-flex flex-grid__item--column">
<div className="subnav subnav--mid-blue-grey">
<div className="subnav subnav--mid-blue-grey" data-theme="dark-ui">
<button
className="navbtn navbtn--left"
onClick={this.props.onEditCancel}
Expand Down Expand Up @@ -240,7 +240,7 @@ class Automatic extends React.Component {
style={{ flexGrow: "1" }}
>
{this.state.isEmpty ? (
<div className="alert alert-info alert-block">
<div className="alert alert-info alert-block sd-margin-b--0">
<h4>The list is empty</h4>
<p>
Please update filter criteria to add articles to the list.
Expand Down
Loading
Loading