UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    tedit development and design discussion

    Scheduled Pinned Locked Moved App Development
    tediteditorappdevelopmentfeatures
    214 Posts 13 Posters 61.3k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • D Offline
        domubpkm @danfro
        last edited by domubpkm

        @danfro not the problems discribed by @Josele13 for me with your last build. But before the last build, i don't know if the problem was there on the volla 22.

        danfroD 1 Reply Last reply Reply Quote 0
        • danfroD Offline
          danfro @domubpkm
          last edited by

          @domubpkm On my OP5T, I had tedit open and any other app. When I was doing the short swipe on the right edge to quick-switch between the two apps, tedit would always crash. But this seems to be fixed now.

          In the end it doesn't matter too much if you had it before or not. Important is, that it doesn't happen anymore now.

          1 Reply Last reply Reply Quote 0
          • danfroD Offline
            danfro
            last edited by

            I just released v3.5.0 of tedit, should appear in OpenStore soon.

            D Josele13J 2 Replies Last reply Reply Quote 2
            • D Offline
              domubpkm @danfro
              last edited by domubpkm

              @danfro hello. The arrow button to toggle toolbar on and off seems to be not very visible. Maybe improve contrast in a next update, if possible.
              screenshot20250130_142943428.png

              And just to point out that you are doing a great job improving Tedit. Thanks again !

              danfroD 1 Reply Last reply Reply Quote 0
              • danfroD Offline
                danfro @domubpkm
                last edited by

                @domubpkm thanks for mentioning this. I mainly use dark theme, so I missed that in abiance. I will try to fix that soon.

                1 Reply Last reply Reply Quote 0
                • Josele13J Offline
                  Josele13 @danfro
                  last edited by

                  @danfro Thank you, with this version Tedit works very well. 👍

                  Xiaomi Redmi Note 9 pro
                  Oneplus Nord 100
                  Xiaomi Redmi Note 7
                  Nexus 5
                  Bq E4.5 Ubuntu edition .... is dead

                  1 Reply Last reply Reply Quote 1
                  • D Offline
                    domubpkm
                    last edited by

                    @danfro Hello. Did you make some progress to find a solution for a 'reading mode only' ?

                    danfroD 2 Replies Last reply Reply Quote 0
                    • danfroD Offline
                      danfro @domubpkm
                      last edited by

                      @domubpkm I am sorry, I forgot to reply. Sadly so far I haven't found a working solution.

                      When setting the TextArea to read-only, we can't navigate in it. So no option. I didn't found time yet to see if some manually added controls allow moving the text in read-only mode.

                      I also tried (after your question, could you please open an issue/feature request so I don't forget about that?) to display the file in a webview. I used that successfully when testing something for weather app and webviews allow pinching and dragging and that.
                      But for some reason simply instantiating a webview component in the code, not even displaying a file, always crashes tedit (of course no error message that might give a direction where to look at). I am totally lost here why that happens. Many apps use webviews for various purposes.

                      1 Reply Last reply Reply Quote 0
                      • danfroD Offline
                        danfro @domubpkm
                        last edited by danfro

                        @domubpkm I finally found my mistake and managed to implement a read-only mode using a webview. Can you (and anyone else of course) please test this new build: link (use link below)

                        It might not be the most fancy way of doing it, but it seems to work. Since the text is shown in html, if you do use common html tags like <b>bold text</b> they should be displayed. Yes, that means if you do bother copying links with the full html link tag, they should be clickable as well.

                        D ikozI 2 Replies Last reply Reply Quote 0
                        • D Offline
                          domubpkm @danfro
                          last edited by

                          @danfro Hello and thank you for your new attempt.
                          I have just tested and at this point, the reading mode only make the app crashes at the opening of a file on the Volla 22 last RC Focal. Reading/writing mode works normally : the app doesn't crash at the opening of a file.

                          danfroD 1 Reply Last reply Reply Quote 0
                          • danfroD Offline
                            danfro @domubpkm
                            last edited by

                            @domubpkm Please try this build. https://gitlab.com/Danfro/tedit/-/jobs/10912582472/artifacts/raw/build/aarch64-linux-gnu/app/tedit.danfro_3.5.1.1_arm64.click

                            I did increase the version number. This might be needed for the device to pick up the apparmor change. I had to add "webview" permission there.

                            D 1 Reply Last reply Reply Quote 1
                            • D Offline
                              domubpkm @danfro
                              last edited by domubpkm

                              @danfro I have to test better but the read only mode works now ! Thanks 👍 Not very easy to select and copy a piece of text, so as to paste, but it seems to work too ! Thanks.

                              Edit :
                              I noticed too in this version :

                              • Seems to put the extension .txt even if we don't want to when we record a file ;
                              • The links https:// isn't clickable in read only mode. Should be clickable ?
                              danfroD 1 Reply Last reply Reply Quote 0
                              • danfroD Offline
                                danfro @domubpkm
                                last edited by danfro

                                @domubpkm tedit uses .txt for all files stored. That should have been there all the time. Is there some different behaviour now than before? 🤔

                                No, the link would only be clickable if you would wrap it in proper html tags. See here: https://www.w3schools.com/html/html_links.asp

                                I will try to see if I can improve the copy option, but that is our morph/webview implementation. Should be the same in your browser.

                                D 2 Replies Last reply Reply Quote 0
                                • ikozI Online
                                  ikoz @danfro
                                  last edited by ikoz

                                  @danfro Why are you using a WebView instead of the normal Text type? If the user uses html shouldn't they open it in the browser instead?
                                  It's much simpler (and faster) to use a Text type.

                                  May the source be with you

                                  danfroD 1 Reply Last reply Reply Quote 0
                                  • danfroD Offline
                                    danfro @ikoz
                                    last edited by

                                    @ikoz Because text doesn't allow scrolling and pan, webview does. The whole handling of long documents is not easy and would need to be added manually. So a webview is an easy out-of-the-box solution. Not perfect, sure.

                                    ikozI 1 Reply Last reply Reply Quote 0
                                    • ikozI Online
                                      ikoz @danfro
                                      last edited by

                                      @danfro What about the readOnly property of the existing TextArea? I tried it and it doesn't seem to have any limitation.

                                      May the source be with you

                                      danfroD 1 Reply Last reply Reply Quote 0
                                      • danfroD Offline
                                        danfro @ikoz
                                        last edited by

                                        @ikoz Have you tried it with a large text in a TextArea? Its too long ago to remember details, but I tried that and decided this won't be a good solution. I think scrolling or so was not possible or some other restriction. Some users do have multi page text, so that would need to be handled.

                                        Its not that I am against it. If we can make that usable I won't mind. Maybe I did something wrong when trying.

                                        ikozI 1 Reply Last reply Reply Quote 0
                                        • D Offline
                                          domubpkm @danfro
                                          last edited by domubpkm

                                          @danfro said in tedit development and design discussion:

                                          tedit uses .txt for all files stored. That should have been there all the time. Is there some different behaviour now than before?

                                          No it is indeed the same behaviour than for the OpenStore click.
                                          In this case, is the first option of the screenshot always apropriate ? (add .txt)

                                          screenshot20250805_110145591.png

                                          danfroD 1 Reply Last reply Reply Quote 0
                                          • ikozI Online
                                            ikoz @danfro
                                            last edited by ikoz

                                            @danfro I think I found the problem you faced. I put a checkbox in the button row to toggle read-only mode, and when read-only mode is enabled, the TextArea isn't transparent so it is always white regardless of the selected theme (dark/ambiance). This may be a Lomiri Toolkit bug, inherited from the QuickControls' TextArea as that never changes the background color.

                                            As an alternative, Text inside a Flickable can also work, but it doesn't allow selecting text, so you can leave it as-is.

                                            May the source be with you

                                            danfroD 1 Reply Last reply Reply Quote 0
                                            • danfroD Offline
                                              danfro @domubpkm
                                              last edited by

                                              @domubpkm This is more for the "human eye". The file will be simple text regardless of the extension. But I think this is safer also when sharing to other apps since they can use the extension.

                                              But I agree, I should simply add the extension without bothering the user with this checkbox.

                                              1 Reply Last reply Reply Quote 0
                                              • First post
                                                Last post