Skip to content

BGDIINF_SB-1856 : share - iframe code snippet generator#408

Merged
pakb merged 5 commits intodevelopfrom
feat-BGDIINF_SB-1856_iframe-generator
Jun 14, 2023
Merged

BGDIINF_SB-1856 : share - iframe code snippet generator#408
pakb merged 5 commits intodevelopfrom
feat-BGDIINF_SB-1856_iframe-generator

Conversation

@pakb
Copy link
Contributor

@pakb pakb commented May 30, 2023

@pakb pakb changed the base branch from develop to feat-BGDIINF_SB-2808_embed-UI May 30, 2023 14:15
* @type Boolean
*/
embeddedMode: false,
embeddedMode: 'true' === new URLSearchParams(window.location.href).get('embed'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this really necessary ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to start the app straight into embed mode, without having the UI flicker between the two states. It's not yet as I wanted it to be, so I'll remove that and create a ticket to tackle this detail

@ltshb
Copy link
Contributor

ltshb commented May 31, 2023

In the shortlink input if you click inside it automatically select the whole input, but on the embed input if you click outside and then back inside nothing is selected. Would be good to have the same behavior for both inputs.

@pakb pakb force-pushed the feat-BGDIINF_SB-1856_iframe-generator branch from 62c751d to 01c9211 Compare June 13, 2023 09:57
@pakb pakb requested a review from ltshb June 13, 2023 09:57
Base automatically changed from feat-BGDIINF_SB-2808_embed-UI to develop June 13, 2023 12:21
@pakb pakb force-pushed the feat-BGDIINF_SB-1856_iframe-generator branch from 023104b to c32d8e9 Compare June 13, 2023 12:22
@ltshb
Copy link
Contributor

ltshb commented Jun 14, 2023

The dropdown button don't uses pointer cursor
image

@ltshb
Copy link
Contributor

ltshb commented Jun 14, 2023

Personnally I would add a bit more space/padding between the icon and the text here
image

Copy link
Contributor

@ltshb ltshb left a comment

Choose a reason for hiding this comment

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

Just the two minor comment above

pakb added 5 commits June 14, 2023 15:06
Now that we support embed=true URL param (with specific UI for this) we can add back the iframe snippet generator portion of the UI with some minor adjustments :

- short link used by the iframe snippet generator is a different one from the share section, as it requires to have embed=true as a URL param
- some of the structure made a couple month ago was not up to date with the latest changes

I also added some e2e Cypress test to cover this iframe snippet modal and its functionalities
- Switch button icon (for embed preview) from "+/-" to caret as on other menu items
- rename generateShortLink function as plural, as there is now two short links being generated
- better handling of short link backend error, with fallback to non shorten URL in case of error
- removing unnecessary complexity with URL param parsing at store init in ui.store.js, a new task will be created to tackle app startup in embed mode so that it never shows the header bar
so that it mimics the behavior of the short link input
Harmonizing margin after icon in the menu tray so that the sections and the "embed" button have the same look
Changing the cursor to a pointer when hovering the size selector in the embed popup
Now only embed is added to the url (without the =true part) so the test was failing to detect correctly the backend request to create a short link with the flag
Also renaming all actions from the share.store.js file to plural when they are dealing with both the normal short link and the embedded version
@pakb pakb force-pushed the feat-BGDIINF_SB-1856_iframe-generator branch from c32d8e9 to 4affbcf Compare June 14, 2023 14:09
@pakb pakb merged commit c6d6ef8 into develop Jun 14, 2023
@pakb pakb deleted the feat-BGDIINF_SB-1856_iframe-generator branch June 14, 2023 14:54
@pakb pakb mentioned this pull request Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants