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

refactor: rename onCloseModal, Modal.Actions, DialogBox.Footer and onInputChange #709

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gmukul01
Copy link
Collaborator

@gmukul01 gmukul01 commented Feb 8, 2023

affects: @medly-components/core

BREAKING CHANGE:

  • onCloseModal prop name is renamed to onClose for Modal & DialogBox.
  • Modal.Actions and DialogBox.Actions is renamed to Modal.Footer and DialogBox.Footer respectively.
  • onInputChange of SearchBox component is renamed to onChange to easily match with other components.

PR Checklist

Description

Rename onCloseModal and Modal.Actions to onClose and Modal.Footer respectively so that we can use interchangeably with Drawer. For example:

const Component = isMobile ? Modal : Drawer;

    return (
        <Component open onClose={() => null}>
            <Component.Header>Add Filters</Component.Header>
            <Component.Content>
                <DateRangePicker value={dates} onChange={setDates} />
                <MultiSelect value={types} onChange={setTypes} options={doctorTypes} />
            </Component.Content>
            <Component.Footer>
                <Button />
            </Component.Footer>
        </Component>
    );

Similarly onInputChange of SearchBox component is renamed to onChange to easily match with other components.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes and API changes)
  • Build changes
  • CI changes
  • Document content changes
  • Performance improvement
  • Add missing tests
  • Others (please describe)

How has this been tested?

(Replace This Text: Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.)

[ ] Test A

[ ] Test B

Fixes #<issue_number>

What is the current behaviour?

(Replace This Text: Please describe the current behaviour you are modifying, or link a relevant issue.)

What is the new behaviour?

(Replace This Text: Please describe the expected new behaviour.)

Does this PR introduce a breaking change?

  • Yes

  • No

  • onCloseModal prop name is renamed to onClose

  • Modal.Actions and DialogBox.Actions is renamed to Modal.Footer and DialogBox.Footer respectively

Additional context

(Replace This Text: Please describe any other related information or add screenshots of the PR.)

Checklist

  • My code follows the style guidelines of this project

  • I have performed a self-review of my own code

  • I have commented my code, particularly in hard-to-understand areas

  • I have made corresponding changes to the documentation

  • My changes generate no new warnings

  • I have added tests that prove my fix is effective or that my feature works

  • New and existing unit tests pass locally with my changes

  • Any dependent changes have been merged and published in downstream modules

…th drawer

affects: @medly-components/core

BREAKING CHANGE:
onCloseModal prop name is changed to onClose
@nx-cloud
Copy link

nx-cloud bot commented Feb 8, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 57edb65. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


🟥 Failed Commands
lerna run build
✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

…and DialogBox.Footer respective

affects: @medly-components/core

BREAKING CHANGE:
rename Modal.Actions and DialogBox.Actions to Modal.Footer and DialogBox.Footer respectively
@pull-request-size pull-request-size bot added size/XL and removed size/L labels Feb 8, 2023
@gmukul01 gmukul01 changed the title refactor: rename onCloseModal to onClose to use it interchangeable wi… refactor: rename onCloseModal and Modal.Actions to onClose and Modal.Footer respectively Feb 8, 2023
@gmukul01 gmukul01 changed the title refactor: rename onCloseModal and Modal.Actions to onClose and Modal.Footer respectively refactor: rename onCloseModal, Modal.Actions to onClose and Modal.Footer respectively Feb 8, 2023
@gmukul01 gmukul01 changed the title refactor: rename onCloseModal, Modal.Actions to onClose and Modal.Footer respectively refactor: rename onCloseModal, Modal.Actions, DialogBox.Footer and onInputChange Feb 8, 2023
…with other components

affects: @medly-components/core

BREAKING CHANGE:
onInputChange is renamed to onChange in SearchBox to match with other components
@sonarcloud
Copy link

sonarcloud bot commented Feb 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

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.

1 participant