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

feat(flyout): support short notation $. #2455

Merged
merged 4 commits into from
Sep 17, 2022

Conversation

prudho
Copy link
Contributor

@prudho prudho commented Sep 16, 2022

Description

This PR is an adaptation from @lubber-de's #2442.

It adds jquery short notation support ($.) to flyout which is made dynamically out of js properties and thus are not bound to an existing dom node.

Previously you always had to select body (which still works) when no existing domnode template exists. Infact the body selector was completely ignored.

Before notation (still supported)

  $('body').flyout({
    title: 'Important Notice',
    content: 'You will be logged out in 5 Minutes',
    actions: [{
      text: 'Alright, got it',
      class: 'green',
      icon: 'save'
    }]
  });

After notation

  $.flyout({
    title: 'Important Notice',
    content: 'You will be logged out in 5 Minutes',
    actions: [{
      text: 'Alright, got it',
      class: 'green',
      icon: 'save'
    }]
  });

@prudho prudho added type/feat Any feature requests or improvements lang/javascript Anything involving JavaScript state/awaiting-reviews Pull requests which are waiting for reviews state/awaiting-docs Pull requests which need doc changes/additions labels Sep 16, 2022
@prudho prudho added this to the 2.9.0 milestone Sep 16, 2022
@prudho prudho requested a review from a team September 16, 2022 12:56
@prudho
Copy link
Contributor Author

prudho commented Sep 16, 2022

Also please note, the removed repaint() function was an artifact from the sidebar module which was useless in this module.

@prudho
Copy link
Contributor Author

prudho commented Sep 16, 2022

Docs added by fomantic/Fomantic-UI-Docs#369.

Copy link
Member

@lubber-de lubber-de left a comment

Choose a reason for hiding this comment

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

Please see my little comment 😉

src/definitions/modules/flyout.js Outdated Show resolved Hide resolved
Copy link
Member

@lubber-de lubber-de left a comment

Choose a reason for hiding this comment

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

I commited my suggested little change myself, i hope you don't mind

@lubber-de lubber-de merged commit 01b81c0 into fomantic:develop Sep 17, 2022
@lubber-de lubber-de added state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo and removed state/awaiting-docs Pull requests which need doc changes/additions labels Sep 17, 2022
@prudho prudho deleted the shortNameCall branch September 17, 2022 08:00
@lubber-de lubber-de removed the state/awaiting-reviews Pull requests which are waiting for reviews label Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/javascript Anything involving JavaScript state/has-docs A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo type/feat Any feature requests or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants