Skip to content

Widget messages but hovers also work now#464

Merged
Vtec234 merged 6 commits intomasterfrom
widget-messages-but-hovers-also-work-now
Jun 16, 2024
Merged

Widget messages but hovers also work now#464
Vtec234 merged 6 commits intomasterfrom
widget-messages-but-hovers-also-work-now

Conversation

@Vtec234
Copy link
Member

@Vtec234 Vtec234 commented Jun 5, 2024

No description provided.

Vtec234 and others added 5 commits June 16, 2024 16:09
Implementation of leanprover/lean4#2064.

Besides adding support for widget messages, this adds an `EnvPosContext`
that stores the position that a component is "about" (see the docstring
for more detail). This was originally proposed in #197 and eventually
dismissed (see #226 for a detailed discussion), but I think it warrants
a reconsideration. While Gabriel's point that there are many positions
around remains true, the `EnvPosContext` stores a very specific one.
This position is only used to retrieve a snapshot, and from that a
`Lean.Environment`, on the server-side. Widgets currently have to pass
this position around manually; this has led to
[errors](leanprover-community/ProofWidgets4@ca66ebb)
in user code. Furthermore, so far I have not encountered any situation
where it makes sense to modify the position; thus a context seems like a
preferable approach. If needed, the context can still be set by users.

I also had to update some package versions to have tests building again.
I hope that didn't break anything!
@Vtec234 Vtec234 force-pushed the widget-messages-but-hovers-also-work-now branch from 90dc274 to 5aec9f6 Compare June 16, 2024 15:12
@Vtec234 Vtec234 merged commit d71803d into master Jun 16, 2024
@Vtec234 Vtec234 deleted the widget-messages-but-hovers-also-work-now branch June 16, 2024 23:21
mhuisi added a commit that referenced this pull request Sep 30, 2025
This PR fixes a bug where the InfoView would sometimes display stale
messages.

The cause of this issue is the introduction of an additional state
variable for the message in #658 and the use of an inadequate key in
#464.
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.

3 participants