Closed pszulczewski closed 6 months ago
Potentially form could be changed to present numbers or letters for tile origins, and under clean() it could be covered back to numbers.
I like this idea. Let's do it!
I had mentioned that we should consider having a generator for the increment https://github.com/nautobot/nautobot-app-floor-plan/issues/8#issuecomment-1423580189
The latest commit is to support letters in the tile form.
@itdependsnetworks I am fine with implementing generator if @joewesch allows more time.
I had mentioned that we should consider having a generator for the increment
I like the idea, but I think what we have so far will be a good start as I believe it covers at least 80% of use cases. Let's count this as incremental progress toward the eventual goal and not mark this as closing/resolving the issue.
I am still thinking if keeping x/y grid setting per object will give good user experience? Maybe it should be a global plugin setting, which is selected only once?
I am still thinking if keeping x/y grid setting per object will give good user experience? Maybe it should be a global plugin setting, which is selected only once?
Yes, a plugin setting default would be great, but still allow for grid specific override. Our client uses different grid patterns per Location.
What is the changelog in the CI? I am not sure why it fails?
What is the changelog in the CI? I am not sure why it fails?
This repo uses towncrier and requires a changelog fragment file: https://docs.nautobot.com/projects/floor-plan/en/latest/dev/contributing/#creating-changelog-fragments
What is the changelog in the CI? I am not sure why it fails?
This repo uses towncrier and requires a changelog fragment file: https://docs.nautobot.com/projects/floor-plan/en/latest/dev/contributing/#creating-changelog-fragments
Thanks. Looks like my branch was checked out beginning of February and it didn't have changes
directory.
I've just re-based on develop
and added a change file.
Patryk, something isn't working right with the edit form. If I set one (or both) of the labels to letters and then edit the floor plan, the form field defaults back to numbers.
When setting a label to use letters, but then putting a number in the form it raise an inconsistent error message:
As part of the clean method we should do one of the following:
Let me check that.
Patryk, something isn't working right with the edit form. If I set one (or both) of the labels to letters and then edit the floor plan, the form field defaults back to numbers.
Looks like it stopped working after changing form field to CharField. I fixed that and added validations. Should be good now, can you please pull and re-test?
@joewesch I have added unittests for the FloorPlanTileForm
because there weren't any for that form, and they revealed that there were still some issues. I've made the necessary updates in forms, we should be good now.
@glennmatthews would you mind giving this a once over?
This draft adds only SVG rendering options to use letters or numbers for the grid numbering axis labels. Selecting letters for the X axis will make the FP look like a chessboard.
The downside is that for adding tiles it still uses numbers, because
FloorPlanTile
modelx_origin
andy_origin
fields are nowPositiveSmallIntegerField
.Potentially form could be changed to present numbers or letters for tile origins, and under clean() it could be covered back to numbers.