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

Perspective switch from open definition in specific cases duplicates the FQN #43

Open
hojberg opened this issue Sep 21, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@hojberg
Copy link
Member

hojberg commented Sep 21, 2022

Steps to reproduce:

  1. Open a definition deep in the tree, say base.data.List.map
  2. Switch perspective to base.data
  3. Use the perspective switch on the open definition (map), which results in base.data.base.data.List.map

Recently I added 2 functions FQN.stripPrefix and FQN.extend that would help solve this problem as the user clicks to change the perspective. This would definitely work, but after talking to @ChrisPenner we think a better solution would be to either construct an absolute name during parse time or get both absolute and the best name, or have both of those fields be served by the backend.

Note that the frontend currently does nothing to re-render a definition with new names when a perspective changes. This behavior should remain—trying to construct best names in the frontend is not the behavior we want. Alternatively we could re-fetch open definitions from the backend, but that would result in a lot of spinners, and some might not resolve with the new perspective (maybe this is ok?). Another alternative is to always clear the workspace on perspective change, though this is likely going to be jarring for the user.

@hojberg hojberg added the bug Something isn't working label Sep 21, 2022
@pchiusano pchiusano added the on-deck Next up to be worked on label Oct 24, 2022
@hojberg hojberg self-assigned this Oct 25, 2022
@hojberg hojberg added snooze-2 Issue is likely to be worked on, might become "on-deck" in the next month or so and removed on-deck Next up to be worked on labels Nov 17, 2022
@dolio dolio removed the snooze-2 Issue is likely to be worked on, might become "on-deck" in the next month or so label Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants