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

[Feature] Site Maps Zoom #143

Closed
CommanderStorm opened this issue Jun 11, 2022 · 17 comments · Fixed by #281
Closed

[Feature] Site Maps Zoom #143

CommanderStorm opened this issue Jun 11, 2022 · 17 comments · Fixed by #281
Assignees
Labels
feature New feature or request frontend Related to the frontend good first issue Good for newcomers

Comments

@CommanderStorm
Copy link
Member

Is your feature request related to a problem? Please describe.
The Site Maps are pretty small. Especially for older folks/ people with disabilitys this represents a significant hurdle. As the text on the image has a fixed size.
image

Describe the solution you'd like
For accassability it may be nice to offer an option for users to zoom into the image/pop it out like for headline images.

i.e. I would prefer a solution like this:
image

Describe alternatives you've considered
In the long term, we are reducing our reliance on these maps anyway as they offer imo worse UX than the map, but sometimes having the extra context of a site-map may be nice.

Additional context
Not a active issue for the person, who suggesed this but something he found a nice to add.

@CommanderStorm CommanderStorm added feature New feature or request good first issue Good for newcomers frontend Related to the frontend labels Jun 11, 2022
@Marius1501
Copy link
Contributor

Hi, I would like to adopt this task. Could you please assign it to me? Thanks.

@octycs
Copy link
Contributor

octycs commented Aug 23, 2022

Sure :) the only thing is @CommanderStorm is planning the migration to vue3, so I hope this doesn't conflict.

@Marius1501
Copy link
Contributor

This issue is already implemented, isn`t it? 😄

@CommanderStorm
Copy link
Member Author

This issue is already implemented, isn`t it?

No, this is still open.
When clicking on the Site-Plans a modal should pop out/ it should be possible to zoom in, or what are you referring to?

@Marius1501
Copy link
Contributor

Oh yes sorry, I was confused. My problem is that I am not able to test my code. Because on http://localhost:8000/build/index-view-main-light-de.html I only get the main page with a network failure. But I need one page with the roomfinder-map. How can I solve this?

@CommanderStorm
Copy link
Member Author

My problem is that I am not able to test my code. How can I solve this?

Usually, this means that the API is down.
Can you check this by navigating to https://nav.tum.de/api/source_code , localhost:8080/api/get/root and localhost:8080/api/search?q=mi?

  • success from api/source_code means, that the API is online,
  • success from api/get means it can communicate with sqlite
  • success from api/search means it can communicate with meilisearch

What does your web browsers console put out? Are there warnings?

Note that if you are trying to use our public API, this won't work until #259 is merged.

@Marius1501
Copy link
Contributor

For https://nav.tum.de/api/source_code I get https://github.com/TUM-Dev/navigatum/tree/1a878722583d3e9161da3d62b29e1c6df2b78572 back.
For localhost:8080/api/get/root I get a connection error.
And for localhost:8080/api/search?q=mi I get also a connection error.
Do I have to do the server documentation? Or is this irrelevant for testing the webclient?

@CommanderStorm
Copy link
Member Author

I don't know why our Project causes so many problems for you.

I get a connection error.

That sounds suspicious: What steps have you followed to get the API online?

More concretely (I am assuming you did run it locally and not via docker or prod):

  • is the sqlite database in the server directory initialized? (i.e. exists+is populated with data)
  • Is meilisearch running? (this is needed for the search to work)
    This is easy to check, head over to http://localhost:7700.
    I can see something like this:
    image
  • What do the API Logs/ browser logs say?

I have done some work over on #268, if you have feedback where something is unclear, this would be highly appreciated 😅

@Marius1501
Copy link
Contributor

Marius1501 commented Nov 1, 2022

I am so sorry and very thankful for your patience with me. 😄 I thought at the beginning that I don`t need MeiliSearch. Now I set it up but on http://localhost:7700/ it says that "There’s no document in the selected index". And in the server terminal I get the following error code:
grafik
And on http://localhost:8000/build/index-view-main-light-de.html I get a 500 server error now.

I think I am very close that it is working. 😆

@CommanderStorm
Copy link
Member Author

That is awkward…
I have just read through our Server docs…
Wow… We really fucked up there… That is really unfortunate how we documented this part…
For example, we did not document how to get data/api_data.db.
This has to improve moving forward @octycs, please hold me accountable to this promise if need be…

Until then, there are two options:

  • I have build two scripts, to skip the repetitive part: staging.sh and regen.sh (regen does regenerate the data and staging does bring a staging online, but depends on regen having run)
    This is not documented, as they are not explanatory at all.
    Basically what our docs are missing is this part:
    echo "regenerating the data for /server"
    (
    cd ./server || exit
    rm -f data/*
    cp ../data/*.json data/
    cp ../data/output/*.json data/
    python load_api_data_to_db.py
    )
  • Follow the docker path/ access https://nav.tum.de for the public API (make sure that your branch includes the changes from Remove API lang cookie #259 😉, to avoid the previous noticed CORS issues)

Thanks for finding all these issues. Telling us, where we are failing is incredibly helpful.

@Marius1501
Copy link
Contributor

Unfortunately is this code part not working.

echo "regenerating the data for /server"
(
cd ./server || exit
rm -f data/*
cp ../data/*.json data/
cp ../data/output/*.json data/
python load_api_data_to_db.py
)

When I want to execute python load_api_data_to_db.py I get a FileNotFoundError because there is no file data/api_data.json. Am I doing something wrong?

@CommanderStorm
Copy link
Member Author

CommanderStorm commented Nov 1, 2022

api_data.json is generated by regen.sh in the lines leading up to line 12, by following the data docs or by downloading it from the web.
Which of these paths have you followed?

I am infering, that you ran regen.sh. What was the console output?

@Marius1501
Copy link
Contributor

grafik
This was the output wen I ran python3 load_api_data_to_db.py. And when I want to copy api_data.json to ./server/data it says that I cannot access the file.

@CommanderStorm
Copy link
Member Author

I have to confess, that I have no idea where you are currently and what you have done to this point.
Please run the following to get me up to speed where you are currently at:

pwd # should print .../NavigaTUM/server
ls -lah ./data # should print the contents of .../NavigaTUM/server/data
ls -lah ../data/ouput # should print the contents of .../NavigaTUM/data/output

Just running load_api_data_to_db.py without generating the data is unfortunately not possible.
As I tried to ask above, have you ran regen.sh, followed the data docs or downloaded it from the web?

@Marius1501
Copy link
Contributor

I downloaded it from the web. But now I got it working finally. 😄 Thank you very much for your patience! I hope I didn't steal that much of your time! Now I can work on it. 👍🏻

@Marius1501
Copy link
Contributor

I have just one more question. Do I have to do something when I change the code and run my test then? Because now nothing changes in my test environment when I change my code and save it. Or do I have to build the server new every time I have changes?

@octycs
Copy link
Contributor

octycs commented Nov 3, 2022

It depends on where you do the changes, but in general yes.

  • For the webclient, you need to rerun gulp (with the command gulp in the webclient directory)
  • For the server, Rust will do that automatically (if you run cargo run)
  • For the data repository, you will need to recompile (python3 compile.py in the data directory, and then reload the data into the server database and restart the server)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request frontend Related to the frontend good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants