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

FE - Annotation Implementation #565

Closed
6 tasks done
omerfaunal opened this issue Dec 5, 2023 · 9 comments
Closed
6 tasks done

FE - Annotation Implementation #565

omerfaunal opened this issue Dec 5, 2023 · 9 comments
Assignees
Labels
difficulty: challenging Requires advanced skills, knowledge, and may involve complex problems or significant research/collab frontend priority: critical This issue requires immediate attention to prevent major issues or disruptions. size: medium Requires moderate effort and may take several days to a week to complete. type: implementation This issue is related to implementation

Comments

@omerfaunal
Copy link
Contributor

omerfaunal commented Dec 5, 2023

Issue Description

Annotation Implementation

Steps

  • Read W3C annotation standards
  • Research Flutter Selectable Texts, Selection Region, TexView, Widget Tree on two environment, Context Builder, BrowserContextMenu

  • Implement different solutions locally
  • Check those implementations with dummy latex if it works
  • Share your results
  • If not works, find another solution and repeat the cycle :)

If everything works as expected we will start implementation afterwards.

Possible difficulties:
Latex renderer creates it's own widget tree preventing us from changing context menu which is the menu that shows up on right click.

Deadline for the Issue

19.12.2023

@ThoAppelsin
Copy link
Collaborator

What do you mean "start"? Didn't we already see some start at the M2 presentation? Was it all fake?

@omerfaunal
Copy link
Contributor Author

omerfaunal commented Dec 7, 2023

@ThoAppelsin Maybe the start is not a good phrase for this case. In M2 we created the skeleton, the UI part. Now we need to implement all the mechanisms to connect it to the backend services, retrieve it, parse it etc. Also the authentication part to prevent everyone adding annotations.

In the meeting, because we didn't have much time to discuss all the details, I left the name as it is and said "Let's meet up later and decide how to proceed" We left the steps empty, we will also fill them after deciding how to proceed.

Still I'm changing it to generic format, Annotation Implementation

@omerfaunal omerfaunal changed the title FE - Start Annotation Implementation FE - Annotation Implementation Dec 7, 2023
@omerfaunal
Copy link
Contributor Author

Here are what I tried on my local environment this week.

1 - Tried to convert latex view to Selectable Text, it was unsuccessful.
2 - Tried to wrap latex view with my own designed AnnotationText Widget, however still same problem occurs. I can't change LatexView's own widget tree. This was unsuccessful.

Also I researched on W3C standards. So when backend ready, we will be able to connect backend and frontend easily. However it is still not possible to directly show the annotation in frontend.

We need to keep trying for next week.

@laylaylo
Copy link
Contributor

I've come across with flutter_math and investigated it. At first sight, it seems like it will probably have the same problems as flutter_math, however it is worth to try it quickly and see if it's more flexible than our current implementation.

I haven't had the time past week to check it in detail but I will continue to work on this next week.

@laylaylo laylaylo added priority: critical This issue requires immediate attention to prevent major issues or disruptions. size: medium Requires moderate effort and may take several days to a week to complete. difficulty: challenging Requires advanced skills, knowledge, and may involve complex problems or significant research/collab type: implementation This issue is related to implementation frontend labels Dec 12, 2023
@laylaylo
Copy link
Contributor

After using flutter_math instead of flutter_tex on my local, I see that it has the same limitations as flutter_tex. Then in their repo I checked in detail whether in-line equations is possible, because they promised it here. That's was the reason why flutter_math got my attention. But after investigation, I found out that even in-line equations/line breaking were their intention they didn't implement them. See issue.. As I understand from discussion, somebody already tried hard to achieve what we wanted even with hardcoded text (i.e no need to search and find equation in text), and they didn't add it to supported library. Realize this flutter_math has its last changes 3 years ago :( another disappointing not much supported library..

@ThoAppelsin
Copy link
Collaborator

Dropping in, I hope you don't mind. (I have been receiving notifications on this thread since I got involved once.)

In summary, I think we cannot make flutter, latex rendering, and annotations work together. Latex rendering and annotations are requirements of the project, and the project won't be certified as "successfully developed" until the requirements are met, and on time. Flutter is not a requirement, so, ultimately, with the current set of requirements, we should do away with the flutter. However, you will definitely be late if you try to do that now, which will also make the project unsuccessful. (I trust you could do it on time if you could take a break from all your other responsibilities, but you cannot and should not, so I suggest that you don't.)

The only way this project can become successful now seems to be through changing the requirements. You may not do away with any one of the requirements no matter the reason/rationale, that is beyond your authority. You could talk with the project owners and try convince them to change the requirements. It is actually very late for that now, but you don't seem to have any other option.

@ThoAppelsin
Copy link
Collaborator

I almost forgot: Thanks for all your efforts to try making it work, I personally really appreciate it. The harsh truth is that this research, apparently, had to be done sooner and we should have stayed away from flutter or at least be done away with it sooner (after finding out that it cannot accommodate latex and annotations simultaneously, through feasibility analysis). It's ok though, and actually great that we did this mistake here and lose only some points, so we hopefully won't do it again later and lose some well-paying customers.

@omerfaunal
Copy link
Contributor Author

As a final approach I implemented Latex Renderer and Annotation as two different features in the same page. One way or another, we can both display Latex and annotate the necessary formulas. Maybe not in the best way but in a parallel way with requirements.

Provider (Backend connection) is not yet implemented because backend not ready. It will be next week's job.

@omerfaunal
Copy link
Contributor Author

Merged to the frontend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: challenging Requires advanced skills, knowledge, and may involve complex problems or significant research/collab frontend priority: critical This issue requires immediate attention to prevent major issues or disruptions. size: medium Requires moderate effort and may take several days to a week to complete. type: implementation This issue is related to implementation
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants