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

Resolves #1570 Formly button type demo added #1578

Merged
merged 9 commits into from
Jan 10, 2025
Merged

Conversation

yerramshilpa
Copy link
Collaborator

Description

This PR is for adding formly button type demos

#1570

Motivation and Context

Type of Change (Select One and Apply Github Label)

  • Bug fix (non-breaking change which fixes an issue) -> Apply bugfix label
  • New feature (non-breaking change which adds functionality) -> Apply enhancement label
  • Breaking change (fix or feature that would cause existing functionality to change) -> Apply breaking label

Screenshots

Which browsers have you tested?

  • [] Internet Explorer 11
  • Edge
  • Chrome
  • Firefox
  • Safari

Checklist:

Copy link

github-actions bot commented Jan 9, 2025

PR Preview Action v1.6.0
Preview removed because the pull request was closed.
2025-01-10 19:35 UTC

type: 'button',
props: {
enableInput: true,
// btnIcon: 'plus-circle',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason to keep these comments in the demo code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed unused code

import { FormlyButtonOptionsModule } from './formly-button-options/formly-button-options.module';
import { importProvidersFrom } from '@angular/core';
import { FormlyButtonConfigurableModule } from './formly-button-configurable/formly-button-configurable.module';
const disable = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm pretty sure this var isn't being used, if so it can be deleted.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed unused code

Copy link
Collaborator

@cwolf10 cwolf10 left a comment

Choose a reason for hiding this comment

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

Couple more bits of unused code + a change to the configurable. Also I noticed that prettier is failing.

@@ -0,0 +1,31 @@
import { Component } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { SelectionMode } from '@gsa-sam/components';
Copy link
Collaborator

Choose a reason for hiding this comment

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

SelectionMode & SdsFormlyTypes are not used, these imports can be removed.

}
this.fields = [temp];
}
inpuField = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo on this var name

@@ -0,0 +1,47 @@
import { AfterViewInit, Component, Input } from '@angular/core';
Copy link
Collaborator

Choose a reason for hiding this comment

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

AfterViewInit not used

@@ -0,0 +1,39 @@
import { Component } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { SelectionMode, TabPanelComponent } from '@gsa-sam/components';
Copy link
Collaborator

Choose a reason for hiding this comment

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

SelectionMode, TabPanelComponent, SdsFormlyTypes not used

providers: [provideAnimations(), importProvidersFrom(FormlyModule.forRoot())],
}),
],
argTypes: {},
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it'd be good to seperate out enableInput & hasModel from the other two inputs to make clear that they are just inputs to control this particular demo and are not used with the formly type. You could seperate them out by adding to argTypes like how id is seperated out in the pagination configurable demo. Here's a link to that config:

id: {
table: {
category: 'paginationConfiguration',
},
control: {
type: 'text',
},
},

@yerramshilpa yerramshilpa merged commit 405d092 into master Jan 10, 2025
3 checks passed
@yerramshilpa yerramshilpa deleted the formly-button-styles branch January 10, 2025 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Tag PR if added documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants