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

Filtering branch #21

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open

Filtering branch #21

wants to merge 36 commits into from

Conversation

alexminden
Copy link

  • API request to filter the tags added

@alexminden alexminden closed this Jul 10, 2022
@alexminden alexminden reopened this Jul 10, 2022
@alexminden
Copy link
Author

Missing:

  • Button to open the filter menu
  • Filter menu

@alexminden
Copy link
Author

I have added a menu that you can open and close by clicking on the parameter's button or close by clicking on the cross's button.
Screen Shot 2022-07-27 at 19 26 43
Screen Shot 2022-07-27 at 19 27 01

@alexminden
Copy link
Author

alexminden commented Jul 27, 2022

Left to do:

  • Remove the Div element from the map
  • Update the Taps state hook

src/filter.js Outdated Show resolved Hide resolved
src/filter.js Outdated Show resolved Hide resolved
src/filter.js Outdated Show resolved Hide resolved
data.append('c3', position.c3.toString());
data.append('c4', position.c4.toString());
const result = await myMizuClient.post(
"/api/taps/search?api_key=56b13329-6163-4884-afc8-b6839cd3f618&l=en&v=1",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexminden could you change this to use config.apiKey?

Copy link
Author

@alexminden alexminden Aug 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for noticing this issue, I have updated the url (fbb2c1a)

@lawriecate lawriecate linked an issue Aug 3, 2022 that may be closed by this pull request
@alexminden alexminden requested a review from stephr3 August 4, 2022 04:22
Copy link
Contributor

@lawriecate lawriecate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry there are now some big conflicts with the main branch , but hopefully not too bad to resolve. Main point will be updating the existing endpoints for getting refill spot data, to apply the filters like you do in the added /filters-params endpoint.

Also, I want to make the filters dialog into a react component!

function menuButtonUi() {
// Button UI
const divButton = document.createElement("div");
divButton.id = "filter";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to convert this file into a react component (e.g. https://github.com/mymizu/mymizu-web/blob/main/src/components/Metrics.jsx) , and seperate the styling out to a css file if possible!

Please let me know if I can explain how to approach !

@@ -45,6 +46,38 @@ app.get("/get-initial-markers", async (req, res) => {
}
});

app.post("/filters-params", async (req, res) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when this get's merged, we'll need to merge with/resolve conflict with existing get-initial-taps and get-marker-moving-map endpoints!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add feature to filter types of refill spot
3 participants