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

Acrobat splash screen #114

Merged
merged 29 commits into from
Sep 19, 2024
Merged

Acrobat splash screen #114

merged 29 commits into from
Sep 19, 2024

Conversation

aishwaryamathuria
Copy link
Collaborator

@aishwaryamathuria aishwaryamathuria commented Sep 16, 2024

https://jira.corp.adobe.com/browse/MWPW-156965

  1. The splash screen fragment can be added in the config in code itself
  2. The localized fragment will be picked for locales (defaulting to en)
  3. Since progress bar does not have any hook or update api will proceed with a set delay and increment. Will update to 100 before redirect
    https://localhost/drafts/mathuria/acrobatfillsign - url to verify on local

Copy link

aem-code-sync bot commented Sep 16, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@aishwaryamathuria aishwaryamathuria changed the base branch from stage to refactor September 16, 2024 10:48
unitylibs/core/styles/splash-screen.css Show resolved Hide resolved
}
}

@media screen and (min-width: 600px) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we should build our way up, the declarations in this media query should be applied by default and declarations for tablet and desktop would live in a media query

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@narcis-radu Made the suggested change

@media screen and (max-width: 600px) {
.splash-loader .text .icon-area img {
width: 104px;
min-width: 104px;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can remove this one and rely on the width declaration. Do you see any usage for this particular declaration?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

made the suggested change

.then((resArr) => {
this.progressUpdater(this.splashScreenEl, 100);
const response = resArr[resArr.length - 1];
if (!response?.url) throw new Error("Error connecting to App");
Copy link
Contributor

Choose a reason for hiding this comment

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

should we provide more details about this error ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe wherever we are throwing Errors, we will update to dispatch error event passing in message coming from the authored error spreadsheet. This will be updated in a following PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@narcis-radu Currently the errors are not handled and would be handled as a part of a different PR that Sanjay would raise.
The throw events are placeholders to some of the errors that would need an error toast

export function updateProgressBar(layer, percentage) {
const p = Math.min(percentage, 100);
const spb = layer.querySelector('.spectrum-ProgressBar');
spb.setAttribute('value', p);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
spb.setAttribute('value', p);
spb?.setAttribute('value', p);

Copy link
Collaborator Author

@aishwaryamathuria aishwaryamathuria Sep 17, 2024

Choose a reason for hiding this comment

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

Made the suggested change.. This function is moved directly in action-binder to remove additional load and faster splash screen preview


export default function createProgressBar() {
const layer = createTag('div', { class: 'progress-holder' }, pdom);
return layer;
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for a const, you should be able to return the resulting element directly

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Made the suggested change.. This function is moved directly in action-binder to remove additional load and faster splash screen preview

@aishwaryamathuria
Copy link
Collaborator Author

@amitbikram I have made the discussed change to pull fragment loading inside action-binder and not via fragment.js and also combine the progress js and css with existing js and css files

}

.splash-loader.show {
display: flex !important;
Copy link
Contributor

Choose a reason for hiding this comment

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

do we really need to set !important here? .splash-loader.show has higher specificity than .splash-loader

@aishwaryamathuria aishwaryamathuria merged commit 1cd9c67 into refactor Sep 19, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants