Skip to content

Commit

Permalink
Made search term save as a recent search when entered from the home p…
Browse files Browse the repository at this point in the history
…age.
  • Loading branch information
AlexGilleran committed Jan 6, 2020
1 parent ba1798f commit 2b84a5d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 26 deletions.
22 changes: 1 addition & 21 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
## 0.0.57

General:

- CSV Connector can now process ampersand character properly
- Fixed broken link minion causes json schema validation error
- Upgraded typescript to 3.7.2 & Use [Project References](https://www.typescriptlang.org/docs/handbook/project-references.html) to organize typescript project
- Upgraded prettier to 1.19.1 to [support typescript 3.7 better](https://prettier.io/blog/2019/11/09/1.19.0.html)

UI:

- Fixed the issue of modifying date string in text input using backspaces to an empty string will cause text input to reset text input
- Added pre-specified options for themes on Add dataset page
- User can't input a future date to date of last modification on add dataset page
- Allow to config whether keywords / themes input can accept manual inputs (or only pre-defined phrases)
- Add specific color to recent search item text

Others:

- Use a "Year" column from a CSV file to extract a temporal extent

## 0.0.56

General:
Expand Down Expand Up @@ -167,6 +146,7 @@ UI:
- Removed help icons without content
- Made read-only calls to the registry api use `/registry-read-only`.
- Fixed: if featureFlags are not set, edit buttons are always shown on dataset page
- Add specific color to recent search item text

Gateway:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
text-align: left;
padding: 0px;
&.search-item-main-button {
color: $search-item-main-button-text;
color: $AU-color-foreground-action;
}
&.markdown {
margin-left: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ class SearchSuggestionBox extends Component<Props & any, any> {
manuallyHidden: false
};
this.cacheImgs();
this.createSearchDataFromProps(this.props);
this.searchInputRef = null;
this.onSearchInputKeyDown = this.onSearchInputKeyDown.bind(this);
this.containerRef = null;
this.saveRecentSearch(this.props);
}

cacheImgs() {
Expand Down Expand Up @@ -142,7 +142,7 @@ class SearchSuggestionBox extends Component<Props & any, any> {
return qStr ? qStr + " " + filters.join("; ") : filters.join("; ");
}

saveRecentSearch(newProps, prevProps) {
saveRecentSearch(newProps, prevProps?) {
const searchData = this.createSearchDataFromProps(newProps);
if (!searchData) return;
if (
Expand Down
2 changes: 0 additions & 2 deletions magda-web-client/src/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ $footer-color-focus: $magda-color-secondary;

$add-dataset-page-button-top-rows: #30384d;

$search-item-main-button-text: #2b1f4b;

$magda-green: #16a085;
$magda-red: #c0392b;
$magda-yellow: #f1c40f;
Expand Down

0 comments on commit 2b84a5d

Please sign in to comment.