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] Adapting code for issue #421, #420 and #419 #422

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/epfl-student-projects/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import studentProjectsIcon from './student-projects-icon'
import InspectorControlsStudentProjects from './inspector'

export const version = "v1.0.2";
export const version = "v2.0.0";

const { __ } = wp.i18n;

Expand Down
6 changes: 5 additions & 1 deletion src/epfl-student-projects/inspector.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
TextControl,
} from "@wordpress/components";
import { __ } from "@wordpress/i18n";
import { version } from './index';

export default class InspectorControlsStudentProjects extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -55,7 +56,8 @@ export default class InspectorControlsStudentProjects extends React.Component {
filteredAndMappedSections = data.map((section) => ({
label: section.acronym,
value: section.acronym,
}));
}))
.sort((a, b) => a.label.localeCompare(b.label));
} else if (this.state.apiSource === "isa") {
filteredAndMappedSections = data
.filter(
Expand Down Expand Up @@ -86,6 +88,8 @@ export default class InspectorControlsStudentProjects extends React.Component {

return (
<InspectorControls>
<p><a className="wp-block-help" href={ __('https://www.epfl.ch/campus/services/student-projects-en/', 'epfl') } target="new">{ __('Online help', 'epfl') } </a></p>
<p className="wp-block-help">{ version }</p>
<PanelBody title={__("API Source")}>
<SelectControl
label={__("Select API Source")}
Expand Down