Repairs that restore a property to as-was condition are never deductible. Improvements, which are defined as something that is a permanent addition to the property that increases the property’s value or extends its useful life, are also not deductible, but they can be added to the cost basis and may reduce your capital gains tax when you sell.
No, if you are referring to your principal residence where you are living, if the floor fell in and you fixed it, it would not be am improvement, but instead a repair.
You cannot deduct repairs to your principal residence. Repairs means to fix something back to its previous condition/use. Those are general expenses that are not deductible nor do they add to the adjusted basis of the property for when it is sold.
If you make improvements, like a new roof, new carpeting throughout, then those costs can be added to the adjusted basis of the property for when it is sold.
Per IRS Pub 946:
Improvement means an addition to or partial replacement of property that is a betterment to the property, restores the property, or adapts it to a new or different use. Generally, an improvement adds value and extends the life of the property.