Skip to content

dashboard: add Notepad widget#9936

Merged
swhite2 merged 20 commits into
opnsense:masterfrom
sopex:note-app-v2
Mar 31, 2026
Merged

dashboard: add Notepad widget#9936
swhite2 merged 20 commits into
opnsense:masterfrom
sopex:note-app-v2

Conversation

@sopex
Copy link
Copy Markdown
Member

@sopex sopex commented Mar 12, 2026

Closes: #9728

If anyone wants to test it :)

image

@Monviech
Copy link
Copy Markdown
Member

It is helpful and admirable that you want to work on so many things.
But please slow down a bit, if somebody has something assigned it would be courteous to ask first in the issue what the strategy is.

@sopex
Copy link
Copy Markdown
Member Author

sopex commented Mar 12, 2026

It is helpful and admirable that you want to work on so many things. But please slow down a bit, if somebody has something assigned it would be courteous to ask first in the issue what the strategy is.

Under no circumstances should you take my commits as a pressure to act on them. I understand you have your own, much more logical priorities. If there is a similar issue/ request I just open a PR.

Anyway, I have missed the mark here with @swhite2 I apologize. It's just that due to the way of our communication, pestering team members on issues/ PR pages IMO is also meh meh so I try to avoid it.

@Monviech
Copy link
Copy Markdown
Member

Don't worry, you are not pestering when you ask questions. It helps with collaboration and planning. :)

@sopex
Copy link
Copy Markdown
Member Author

sopex commented Mar 24, 2026

@swhite2 I once again apologize for this. How do you want to play it? Shall I finish it and tag you for review? Shall I let you do it from the begining your way? Do you have any input? Thanks!

@swhite2
Copy link
Copy Markdown
Member

swhite2 commented Mar 24, 2026

@sopex No worries, to be honest this slipped my mind a bit. Given the scope, go ahead and finish it and tag me for review, I don't expect a lot of code to shift afterwards, but we'll see.

@sopex sopex marked this pull request as ready for review March 25, 2026 00:42
@sopex
Copy link
Copy Markdown
Member Author

sopex commented Mar 25, 2026

@swhite2 Let me know :)

@sopex sopex changed the title Note widget dashboard: add Notepad widget Mar 25, 2026
@swhite2
Copy link
Copy Markdown
Member

swhite2 commented Mar 25, 2026

Couple of points:

  • Let's rename it "Notes"
  • I don't want a save button in there, so it's best to combine this with the edit mode of the widgets. Move the editable textbox to the rendered options form when "edit" is clicked, and the "notes" will just be rendered as text - no textbox around it. This will require a new type in https://github.com/opnsense/core/blob/master/src/opnsense/www/js/opnsense_widget_manager.js#L779-L817 (much like is the case with our form xmls).
  • this.titleVisible = false; will probably work better for this widget, much like the picture widget.

@sopex
Copy link
Copy Markdown
Member Author

sopex commented Mar 25, 2026

Couple of points:

  • Let's rename it "Notes"
  • I don't want a save button in there, so it's best to combine this with the edit mode of the widgets. Move the editable textbox to the rendered options form when "edit" is clicked, and the "notes" will just be rendered as text - no textbox around it. This will require a new type in https://github.com/opnsense/core/blob/master/src/opnsense/www/js/opnsense_widget_manager.js#L779-L817 (much like is the case with our form xmls).
  • this.titleVisible = false; will probably work better for this widget, much like the picture widget.

Thank you for your comments.

After some extensive testing, I am afraid that removing the save button makes this counterintuitive to use, especially on mobile.

That being said, I don't have any better ideas for removing the save button, only auto-saving, which might have issues of its own, so I will try to have something working as soon as possible.

sopex added 3 commits March 28, 2026 01:36
* test

* fix

* fix resize

* Revert "fix resize"

This reverts commit 066cb23.

* :)

* lets see

* :(

* mpa
* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* full c

* Revert "full c"

This reverts commit 35faaf0.

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Revert "Update Notepad.js"

This reverts commit 8ca1fe9.

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js

* Update Notepad.js
* :)

* Update Notes.js
@sopex
Copy link
Copy Markdown
Member Author

sopex commented Mar 28, 2026

@swhite2 Ready

You were absolutely right, it's much better this way!

image image

@swhite2
Copy link
Copy Markdown
Member

swhite2 commented Mar 30, 2026

@sopex This does look a lot better indeed :)

Neat how it now streamlines the content into the dashboard config with the new option type.

@sopex
Copy link
Copy Markdown
Member Author

sopex commented Mar 30, 2026

@sopex This does look a lot better indeed :)

Neat how it now streamlines the content into the dashboard config with the new option type.

Indeed it's cool :)

Comment thread src/opnsense/www/js/widgets/Notes.js Outdated
Comment thread src/opnsense/www/js/widgets/Notes.js
@sopex
Copy link
Copy Markdown
Member Author

sopex commented Mar 30, 2026

@swhite2 Resolved

Copy link
Copy Markdown
Member

@swhite2 swhite2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last nitpicks, looks good otherwise - thanks for bearing with me.

Comment thread src/opnsense/www/js/widgets/Notes.js
Comment thread src/opnsense/www/js/widgets/Notes.js Outdated
Comment thread src/opnsense/www/js/opnsense_widget_manager.js
@sopex
Copy link
Copy Markdown
Member Author

sopex commented Mar 31, 2026

@swhite2
No worries, merge my other 2 PRs today, and I will forgive you. #10063 #9608 :)
Bonus points if you have any good ideas for the opnsense-auto problem #9916

Have a great rest of your day!

@swhite2 swhite2 merged commit 558bedd into opnsense:master Mar 31, 2026
Greelan pushed a commit to Greelan/opnsense-core that referenced this pull request Apr 5, 2026
fichtner pushed a commit that referenced this pull request Apr 17, 2026
(cherry picked from commit 558bedd)
(cherry picked from commit e54c919)
fichtner pushed a commit that referenced this pull request Apr 22, 2026
(cherry picked from commit 558bedd)
(cherry picked from commit e54c919)
fichtner pushed a commit that referenced this pull request Apr 23, 2026
(cherry picked from commit 558bedd)
(cherry picked from commit e54c919)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Adding a notes / notepad / scratchpad type widget on the dashboard?

3 participants