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

Stop hiding the grids when POI is removed #3292

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

MizukiTemma
Copy link
Member

@MizukiTemma MizukiTemma commented Dec 12, 2024

Short description

This PR fixes the prblem that the middle and right grid are closing when a POI is removed while editing an existing contact.

Proposed changes

  • Remove code lines that close the grids whenever location is unseleted
  • Change the trash icon to pencil icon
  • Add a message indicating location is mandatory.

Side effects

  • I hope none 🙈
  • Please check for side effects in event form too

Resolved issues

Fixes: #3151


Pull Request Review Guidelines

@MizukiTemma MizukiTemma added deadline Needs to be fixed in the given time prio: high Needs to be resolved ASAP. labels Dec 13, 2024
Copy link
Contributor

@JoeyStk JoeyStk left a comment

Choose a reason for hiding this comment

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

Thank you very much for the PR! I think it looks good so far 🚀

During my review I checked the following:
✔️ The PR follows the design and uses the correct wording of the design
✔️ Code is understandable to me (besides one nit and one question, see below :) )
✔️ Checking in the events form for side effects. By positive testing, I couldn't find a side effect. The next reviewer could focus on some negative testing :)

@@ -3,11 +3,11 @@ import { getCsrfToken } from "./utils/csrf-token";

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I think we said at one point, that the underscore should be used for Python/Django files and for JS/TS files, we just a dash instead. So, if I remember correctly, I think this should be poi-box.ts. I hope changing this won't give you a headache 🙈

console.debug("Removed POI data");
document.getElementById("poi-address-container").getElementsByTagName("input")[0].value = "-1";
Copy link
Contributor

Choose a reason for hiding this comment

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

Am I understanding correctly that you're searching for the poi input field? If so, I think it would be better to get the Element by id, as it already has the id of poi-query-input. With the current implementation I see the potential risk, that we at one point in the future we add another input field and then this line would not be correct anymore?

Copy link
Member Author

Choose a reason for hiding this comment

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

The target is another input element in _poi_address_container.html but it has an ID too and your suggestion is applied 😸

@MizukiTemma
Copy link
Member Author

@JoeyStk Thank you for review 😸 Your suggetions are applied 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deadline Needs to be fixed in the given time prio: high Needs to be resolved ASAP.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When editing a contact and removing the location it hides the other grid items
2 participants